Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Router {
if (e instanceof JSONRPCError) {
return { error: { code: e.code, message: e.message, data: e.data } };
}
return { error: { code: 6969, message: "unknown error" } };
return { error: { code: 6969, message: e.message } };
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this could be

{
   error: {
     code: 6969,
     message: "unknown error",
     data: {
       message: e.message
     }
   }
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if its not a JSON RPC error, then its an internal error, and we should not leak internal errors to the API user.

}
}

Expand Down