Skip to content

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: https://github.com/nodejs/node/issues/11637

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • [ ] documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

process

Merge request reports

Loading