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: set rfc_7807_compliant_errors to true #7084

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Mar 22, 2025

It was a little tricky, but finally i figured out how to do it: https://api-platform.com/docs/core/errors/

The big impact is, that the serialization of the errors is now done with the same infrastructure as serializing entities. That makes it less format dependent.

It seems a little weird that we use a provider to "replace" the exception path of the response by extracting the exception of the context, and then continuing like when we would serialize a response. But i can also see the benefits.
See api-platform/core#5974

Issue: #6618

It was a little tricky, but finally i figured out how to do it:
https://api-platform.com/docs/core/errors/

The big impact is, that the serialization of the errors is now
done with the same infrastructure as serializing entities.
That makes it less format dependent.

It seems a little weird that we use a provider to "replace" the exception path
of the response by extracting the exception to the context,
and then continuing like when we would serialize a response.
But i can also see the benefits.
See api-platform/core#5974

Issue: ecamp#6618
@BacLuc BacLuc requested review from a team, usu and pmattmann March 22, 2025 17:03
@BacLuc BacLuc added the deploy! Creates a feature branch deployment for this PR label Mar 25, 2025
@BacLuc BacLuc temporarily deployed to feature-branch March 25, 2025 09:06 — with GitHub Actions Inactive
Copy link

github-actions bot commented Mar 25, 2025

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

@BacLuc BacLuc removed the deploy! Creates a feature branch deployment for this PR label Mar 25, 2025
@BacLuc BacLuc force-pushed the migrate-rfc-compliant-errors branch from 8c234a9 to b1de32a Compare March 29, 2025 10:39
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 this pull request may close these issues.

1 participant