Skip to content

Commit

Permalink
feat: sending code along with error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadaf-A committed Feb 25, 2024
1 parent 1d48a83 commit d1cdcd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function logError(e) {
const error = JSON.stringify(e);
const errorObj = JSON.parse(error);
if (errorObj && typeof errorObj === 'object' && 'code' in errorObj && 'message' in errorObj) {
throw new NeutralinoError({ code: errorObj.code, message: errorObj.message});
throw new NeutralinoError({ code: errorObj.code, message: `${errorObj.message} - code : ${errorObj.code}`});
} else {
console.error('Invalid error object:', errorObj);
}
Expand Down

0 comments on commit d1cdcd8

Please sign in to comment.