Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection not found after error message is returned via extended Admin API #119

Open
kevinNgws opened this issue Oct 2, 2018 · 0 comments

Comments

@kevinNgws
Copy link

kevinNgws commented Oct 2, 2018

Was trying to do some business logic when deleting a document via the extended Admin API. When I returned an error message to forest, the intended-to-be-deleted document cannot be viewed. It can only be viewed after the page is refreshed. Am I doing it the wrong way?

Expected behavior

Able to click and view the detail of the selected document even after error message is return via the extended Admin API.

forestAdminApiRouter.route('/Group/:id').delete(async (req, res, next) => { try { res.status(400).send('This is the error message'); } catch (err) { res.status(400).send(err.message); }

Actual behavior

Returns 404 collection not found with error message "The collection you are trying to reach no longer exists, it may have been renamed"

Context

  • Package Version: 2.14.1
  • Express Version: latest
  • Mongoose Version: 5.2.8
  • MongoDB Version: latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant