JavaScript bug pattern 006 - promise rejection
Common JavaScript failure involving promise rejection. Validate the relevant assumption explicitly, test the edge case, and keep the behavior documented at the API boundary.
Clear note on javascript / bug-pattern. "JavaScript bug pattern 006 - promise rejection" is the kind of detail that is easy to overlook.
- @ohmshawas23▲ 4
Saved
- @sohmeh▲ 3
Clear note on javascript / bug-pattern. "JavaScript bug pattern 006 - promise rejection" is the kind of detail that is easy to overlook.
- @hk3narwhal▲ 3
Perfect
- @dearsohum▲ 3
"JavaScript bug pattern 006 - promise rejection" is a useful thing to know about with javascript / bug-pattern. Thanks for sharing it.
- @aarya-mehta▲ 3
"JavaScript bug pattern 006 - promise rejection" is a useful thing to know about with javascript / bug-pattern. Thanks for sharing it.
Intuitive
Straightforward
- @narwhalix▲ 3
Since Node 15, unhandled promise rejections crash the process by default. Attach
.catch()or wrapawaitintry, and use theunhandledrejectionevent in browsers for global logging. Got a different fix? Post it in the comments. - @prranit-max▲ 3
Useful practical note—JavaScript bug pattern 006 - promise rejection is clearly explained, and the edge case plus mitigation are easy to apply.
Wise
- @mrnarwhal55▲ 2
Expert
- @narwhalix▲ 2
Intuitive
Thoughtful
Remarkable
Precise
- @saltysamm▲ 2
Good to see "JavaScript bug pattern 006 - promise rejection" written down. Handy reference for anyone working with javascript / bug-pattern.
Masterful
- @deneil2121▲ 2
Efficient
- @ohmshawas23▲ 2
Detailed
- @imsa-mehta▲ 2
Appreciate the write-up on "JavaScript bug pattern 006 - promise rejection". Useful for anyone using javascript / bug-pattern.
Clear note on javascript / bug-pattern. "JavaScript bug pattern 006 - promise rejection" is the kind of detail that is easy to overlook.
- @deneil2121▲ 1
Useful
- @sohumm15▲ 1
Good to see "JavaScript bug pattern 006 - promise rejection" written down. Handy reference for anyone working with javascript / bug-pattern.
Learned
Brilliant