Promise catch problem
See original GitHub issueI’m having a problem when creating a Transaction, it is triggering ‘catch’ on Promise but when consoling error message it returns a stringed object.
console.log(err.message);
// Prints "[object Object]"
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Promise.prototype.catch() - JavaScript - MDN Web Docs
The catch() method of a Promise object schedules a function to be called when the promise is rejected. It immediately returns an equivalent ......
Read more >Error handling with promises
In the task an error is thrown form inside the promise and promise is never settled neither with a resolve nor reject. The...
Read more >Javascript promise .catch not working
method returns a Promise and deals with rejected cases only. It behaves the same as calling Promise. prototype.
Read more >Using .then(), .catch(), .finally() to Handle Errors in Javascript ...
A Promise executes immediately and either resolves to a single value, or rejects with an error object. If the promise is rejected, the...
Read more >Promise Error Handling
Inside the promise, the catch() method will catch the error caused by the throw statement and reject() . If an error occurs and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
An error object should always have a “message”. We definitely need to fix this on pagarme-js
@henriquekano Thanks for the clue