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

500 error when not specifying JSON content type header #80

Open
aquiporras opened this issue Aug 30, 2021 · 1 comment
Open

500 error when not specifying JSON content type header #80

aquiporras opened this issue Aug 30, 2021 · 1 comment
Assignees

Comments

@aquiporras
Copy link

See #79 for more context.

When the content type header is not present in the request specifying it is JSON, the body is not properly parsed and it will fail with different errors depending on the endpoint called.

Usually with a 500 error thrown by lightning internally, which is really misleading.

Being a rest client would be nice to do more validation on the parameters (returning 400 or 422 when mandatory parameters are missing) and 415 when the content type is not JSON as expected.

@saubyk saubyk self-assigned this Dec 4, 2021
@saubyk saubyk added this to the Release 0.6.1-beta milestone Dec 4, 2021
@saubyk
Copy link
Collaborator

saubyk commented Mar 24, 2022

@aquiporras this will be a significant change, as each controller would need to updated to return contextual error.

I will keep this issue open, but will be able to address it over a period of time gradually. Meanwhile, PRs are welcome. 😄

@saubyk saubyk removed this from the Release 0.7.0-beta milestone Mar 24, 2022
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

2 participants