Skip to content

Resurrect from post save error middleware #5464

Open
@porsager

Description

@porsager

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
Once post save error middleware is reached it's not possible to return to the success path

What is the expected behavior?
A way to return from post save error middleware to resolve the initial promise

Use case
For instance handle a duplicate error (11000) by creating a new identifier which isn't a duplicate and resave the document returning the new save promise to the initial save call.

Please mention your node.js, mongoose and MongoDB version.
node 8.1.4, mongoose 4.11.1, mongo 3.4.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis issue is a user-facing general improvement that doesn't fix a bug or add a new feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions