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

Correct return errors from Post endpoints #67

Open
matheusgomes28 opened this issue Mar 25, 2024 · 1 comment
Open

Correct return errors from Post endpoints #67

matheusgomes28 opened this issue Mar 25, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@matheusgomes28
Copy link
Owner

the the main CMS app, the get post endpoints are returning 500 in a few edge cases:

  1. When the post ID passed is negative /posts/-1
  2. When the post ID passed is not an integer /posts/someString
  3. When the post ID passed it not a valid post /posts/10000000

In all those cases, I think we should be returning a Bas Request.

@matheusgomes28 matheusgomes28 added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Mar 25, 2024
@SourabHere
Copy link
Contributor

SourabHere commented Mar 30, 2024

Raised a PR solving this issue, please review

I think for the ""/posts/10000000" the status code should be 404 if its not there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants