process: cast promise rejection reason to string · nodejs/node@c4062c1 · GitHub
Skip to content

Commit c4062c1

Browse files
apexskierevanlucas
authored andcommitted
process: cast promise rejection reason to string
The unhandled promise rejection warning uses a template literal and prints the reason a promise was rejected. If rejecting with a symbol, the symbol failed to convert to a string and the process crashed. Now, symbols are casted to strings and the process does not crash. Fixes: #11637 PR-URL: #11640 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 2331c9b commit c4062c1

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

lib/internal/process/promises.js

Lines changed: 1 addition & 1 deletion
Lines changed: 18 additions & 0 deletions

0 commit comments

Comments
 (0)