Skip to content

Commit

Permalink
better error inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
devton committed Sep 23, 2023
1 parent 8e2462c commit fc0cf85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion services/payment-service-api/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,18 @@ const finishProcessOk = (result) => {
};
const finishProcessErr = (result) => {
console.log('finished with error ', result);
try {
console.log(JSON.stringify(result));
} catch (error) {
console.log(error);
}
handleError(result);
process.exitCode = 1;
process.exit(1);
};

getStdin().then((notification) => {
if(!R.isNil(notification)) {
if (!R.isNil(notification)) {
main(notification)
.then(finishProcessOk)
.catch(finishProcessErr);
Expand Down

0 comments on commit fc0cf85

Please sign in to comment.