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

Error in the code in order route #30

Open
Ram-143-sai opened this issue Apr 9, 2023 · 1 comment
Open

Error in the code in order route #30

Ram-143-sai opened this issue Apr 9, 2023 · 1 comment

Comments

@Ram-143-sai
Copy link

while invoking a post request its throwing error response 500
image

the error was
image

@Ram-143-sai
Copy link
Author

By simply adding a 'new' before mongoose.Types.ObjectId() at line 45 can fix this.

Ram-143-sai added a commit to Ram-143-sai/node-restful-api-tutorial that referenced this issue Apr 9, 2023
With respect to the issue raised academind#30. due to initialization of constructor objectId without new its throwing error. Add the changes now which working fine.
Ram-143-sai added a commit to Ram-143-sai/node-restful-api-tutorial that referenced this issue Apr 9, 2023
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