Kai Dederichs
Kai Dederichs
Digging into it, it's running into this exception: https://github.com/api-platform/core/blob/ac8031eb42810e6c538ffaca295cf7b4d35adf06/src/Serializer/AbstractItemNormalizer.php#L546 Maybe the test is the other one with the context?
Yeah I don't think that test covers it. I just switched out the exception with a `return null` and the `relation.feature` test keeps running the same as before
@soyuka When I run your test and add ``` And the JSON should be a superset of: """ { "@id": "/errors/400", "@type": "hydra:Error", "title": "An error occurred", "detail": "Item not...
Sure, but the 500 happens when you get a "Item not found" error, not an "Invalid Iri" error. So it would seem the test doesn't seem to test the actual...
Like the test setup seems to be flawed in a way. Looking into it more it throws Invalid Iri in `AbstractItemNormalizer.php:572` because no route matches `"/issue6116_relation/1"`. The route should exist...
Hmm still works, I'm trying to track down what's causing it
Ok found the issue @soyuka The error happens if you define custom exception mappings: ``` exception_to_status: App\Exception\OrganisationNotSetException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_FORBIDDEN App\Exception\ProjectNotSetException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_FORBIDDEN ``` It maybe overwrites the ones you guys...
Also in the test bundle's `config_common.yml` this is suppressing it cause you're manually mapping the exception status in the tests: ``` Symfony\Component\Serializer\Exception\ExceptionInterface: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST ``` If you remove that line...
Yeah that would be useful, along with what the default actually is. Or maybe just merge it as a new feature?
I'd still like something like that, so not stale