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

Internal server error if a invalid parameter is sent on the route #1191

Open
alamadorm opened this issue Jun 12, 2024 · 0 comments
Open

Internal server error if a invalid parameter is sent on the route #1191

alamadorm opened this issue Jun 12, 2024 · 0 comments

Comments

@alamadorm
Copy link

Describe the bug
If i have an endpoint todo/:id in wich de id is int and i send an string is causing an internal server error, it should respond with a bad request.
To fix this I handled the exception in the exception Handler, but for some reason, if the ASPNETCORE_ENVIROMENT is set to Production there is not detail in the response, otherwise is returning the details on the response.

To Reproduce
Steps to reproduce the behavior:

  1. Call the [PUT] /api/TodoItems/{id} endpoint with an string intead of a integer

Expected behavior
It should return a bad request

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