Server crashes when throwing inside Cloud Code trigger #8255
Labels
state:breaking
Breaking change requires major version increment and `BREAKING CHANGE` commit message
state:released
Released as stable version
state:released-beta
Released as beta version
type:bug
Impaired feature or lacking behavior that is likely assumed
New Issue Checklist
Issue Description
Parse Server crashes when throwing inside a Cloud Code trigger. The crash is due to the removal of the
UnhandledPromiseRejectionWarning
in Node 15. Parse Server handles trowing inside a Cloud Code function differently and returns a Parse error without crashing the server.Breaking Change
This change is breaking because developers may have implemented their own solution by globally catching unhandled rejections on the node process with:
Steps to reproduce
This test fails:
However, throwing in a Cloud Code function passes the test:
Actual Outcome
Throwing in trigger crashes server.
Expected Outcome
Throwing in trigger returns Parse error without crashing the server.
Environment
Server
The text was updated successfully, but these errors were encountered: