parse-community / parse-community/parse-server
node crashes when promise rejection occurs in apiCallback
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version.
Issue Description
When trying to send a mail with wrong server configuration, the adapter returns a success but when the transporter promise is rejected it falls back to parse which makes node crash by throwing an error.
Steps to reproduce
Use bad configuration in the transported or simply return a rejected promise in apiCallback
Actual Outcome
Crash report printed from node_modules/parse-server/lib/ParseServer.js#L261
Expected Outcome
The error should be handled or we should have the possibility to wait for a sucess/failure of the sending before returning to the client.
Failing Test Case / Pull Request
Environment
- API Mail Adapter version:
2.2.0 - Parse Server version:
5.4.0
Logs
express:router dispatching POST /requestPasswordReset
node_modules/parse-server/lib/ParseServer.js:261
throw err;
^
Waiting for the debugger to disconnect...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at node_modules/parse-server/lib/ParseServer.js#L261 and trace how a rejected transporter promise or apiCallback rejection reaches that throw. Reproduce the issue with bad mail-server configuration or a rejected apiCallback promise. Done should prevent the Node.js process from crashing and define how the sending failure is reported, but the expected client-facing behavior remains unspecified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100