Skip to content

Commit

Permalink
Properly handle errors messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Nov 5, 2022
1 parent bc09937 commit 8e2fdfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function makeRpc(name, ...params){
const obj = await output.json();
if(obj.error) {
const imATeapot = 418;
return { status: imATeapot, response: obj.error };
return { status: imATeapot, response: obj.error.message };
} else {
const ok = 200;
return { status: ok, response: obj.result };
Expand Down

0 comments on commit 8e2fdfc

Please sign in to comment.