Express sets body to Cannot GET [route] while asynchronous code is being executed #4965
Unanswered
askenderski
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an express application with some articles stored in a Mongo database. While I'm waiting for the mongoose model Article to load, the body of the request is changed to:
and the status code to 404. The code I'm using to see the body being sent is this:
It's a slightly modified version of this one: https://stackoverflow.com/a/34712950/13300387
My code is this:
route
model
I have posted this same question on Stack Overflow (https://stackoverflow.com/questions/73237206/express-sets-body-to-cannot-get-route-while-asynchronous-code-is-being-execute) but I did not get an answer and cannot think of how to modify it to be more concise or clear.
Beta Was this translation helpful? Give feedback.
All reactions