api-platform-ms-bundle icon indicating copy to clipboard operation
api-platform-ms-bundle copied to clipboard

ErrorException on 400 Responses without Violations

Open Rainrider opened this issue 9 months ago • 0 comments

When an API returns a 400 response without validation violations, AbstractConstraintViolationListDenormalizer throws an ErrorException 'Warning: Undefined array key "violations"'

400: Bad Request responses in Api Platform normally do not have details on validation violations (those are normally contained in 422: Unprocessable Entity). An example for such response is when an IRI cannot be resolved to a resource which is then resolved to a 400 status code.

Rainrider avatar May 10 '25 21:05 Rainrider