fix(metadata): reject invalid HTTP status codes on operations by Maxcastel · Pull Request #8714 · api-platform/core · GitHub
Skip to content

fix(metadata): reject invalid HTTP status codes on operations - #8714

Open
Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/operation-status-validation
Open

Maxcastel wants to merge 1 commit into
api-platform:5.0from
Maxcastel:fix/operation-status-validation

Conversation

@Maxcastel

Copy link
Copy Markdown
Contributor
Q A
Branch? 5.0
License MIT
Doc PR

new Post(status: 999) only failed when the response was created, after the processor had already run (so the resource was saved and the client got a 500). Same for the values of exceptionToStatus.

These are now checked when the metadata is built, with the same rule as the exception_to_status config (100 to 599), and the error tells which operation is wrong.

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