Skip to content

Commit

Permalink
added return error as json (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shangaman committed Nov 9, 2022
1 parent 3645167 commit 5c4de0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
RPC_CREDENTIALS=username:password
RPC_CREDENTIALS=masternode_test:p
ALLOWED_RPCS=help,listmasternodes
PORT = 3000
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function makeRpc(name, ...params){
}
}catch(error){
if (error.errno === "ECONNREFUSED") {
return { status: 503, response: "PIVX node was not responsive." };
return { status: 503, response: JSON.stringify({response: "PIVX node was not responsive."})};
}
if (error.name === 'AbortError') {
return "brequbest was aborted'";
Expand Down

0 comments on commit 5c4de0e

Please sign in to comment.