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

Invalid ObjectId Causes Server to Respond with 500 Error Code #200

Closed
stanleyowen opened this issue Jun 5, 2021 · 0 comments
Closed

Invalid ObjectId Causes Server to Respond with 500 Error Code #200

stanleyowen opened this issue Jun 5, 2021 · 0 comments
Assignees
Labels
bug Something isn't working dependencies fixed

Comments

@stanleyowen
Copy link
Owner

Describe the bug
Invalid MongoDB ObjectId causes server to respond with 500 (Internal Server Error) error code, which will cause the server to retry requesting the same ObjectId every seconds.

Invalid ObjectId described above is a string which consists more or less than 24 characters.

To Reproduce
Steps to reproduce the behavior:

  1. Click on the following link: https://otlio.netlify.app/edit/012837823
  2. Open Developer Tools > Console
  3. See error

Expected behavior
If server receives an invalid ObjectId, server should responds with 400 (Bad Request) error code instead of 500 (Internal Server Error)

Screenshots
Invalid ObjectId Causes Server to Respond with 500 Error Code

Desktop (please complete the following information):

  • OS: Windows 10 OS Version 2009 (Build 19043.1023)
  • Browser Chrome
  • Version 91.0.4472.77
@stanleyowen stanleyowen self-assigned this Jun 5, 2021
@stanleyowen stanleyowen added bug Something isn't working dependencies labels Jun 5, 2021
@stanleyowen stanleyowen changed the title Invalid ObjectId Causes Server to Respond with 500 Error Code Invalid ObjectId Causes Server to Respond with 500 Error Code Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies fixed
Projects
None yet
Development

No branches or pull requests

1 participant