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

Validation errors not returned properly (CORS issue?) #2764

Closed
usu opened this issue May 28, 2022 · 0 comments · Fixed by #2798
Closed

Validation errors not returned properly (CORS issue?) #2764

usu opened this issue May 28, 2022 · 0 comments · Fixed by #2798
Assignees

Comments

@usu
Copy link
Member

usu commented May 28, 2022

Validation errors (422 responses) are not properly returned in the frontend. The status code is correct, but the payload is empty and in Javascript, the error is detected as "network error". Chrome says, the issue is the missing "Access-Control-Allow-Origin" header.
image
image

For example when changing the material list name to something longer than 32 characters:
image

I think the underlying issue is this one: nelmio/NelmioCorsBundle#124

Symfony throws a ValidationException, in which case the kernel.response event is not processed. As of today, NelmioCorsBundle only listens on the kernel.response event.

Anyone can reproduce? What is weird is that I'm pretty sure this has worked earlier, hasn't it?

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

Successfully merging a pull request may close this issue.

2 participants