Skip to content

node crashes when promise rejection occurs in apiCallback #8496

Description

@ntraut

New Issue Checklist

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions