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

Api routes should return proper json responses #685

Open
y3n4 opened this issue Dec 9, 2024 · 0 comments
Open

Api routes should return proper json responses #685

y3n4 opened this issue Dec 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@y3n4
Copy link
Contributor

y3n4 commented Dec 9, 2024

api controller currently return html in case entity mapping fails

todo:

  • return json instead of html in case mapping of request returns error
  • optionally define appropriate status code if mapping fails (default is 422 unprocessable content)

https://symfony.com/doc/current/controller.html#mapping-request-payload

@y3n4 y3n4 added the bug Something isn't working label Dec 9, 2024
@y3n4 y3n4 self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant