-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
Error message for invalid UUID on the URL #3045
Comments
The exception message is indeed misleading. We'll have to see if we can tell the different cases apart, but in this case it should say something like: "Not found, because of an invalid identifier format" WDYT? |
Oh. I just realized I opened this with the wrong user. Anyway. I agree. We could throw a different exception type from the |
This should be the correct exception: https://github.com/symfony/symfony/blob/v4.3.4/src/Symfony/Component/Serializer/Exception/NotNormalizableValueException.php |
Great. It's ok if I work on it? |
Please go ahead. PR welcome! |
Mb related #2191 |
As discussed in issue api-platform#3045, the given error message was misleading. I also updated the thrown exception according to the Exception mentioned in the same issue. Of course I updated the related PHPUnit test too.
As discussed in issue api-platform#3045, the given error message was misleading. I also updated the thrown exception according to the Exception mentioned in the same issue. Of course I updated the related PHPUnit test too.
we fixed this in #3132 afaik |
Hi.
Having an API Resource with the following identifier configuration (I got it from the demo), when I send a request like this:
curl -X GET "https://demo.api-platform.com/books/wrong-id" -H "accept: application/ld+json"
It fails because of the denormalization, returning a 404 error thrown by theReadListener
So, the error handling works perfectly. But, the message response of the request is: "Not found, because of an invalid identifier configuration". My question: What is the best approach to customize this message? It isn't a configuration mismatch on that case.
The text was updated successfully, but these errors were encountered: