Skip to content

[!!!][TASK] Refactor exception handling - #175

Merged
kszymukowicz merged 1 commit into
release/5.0.0from
refactor-exceptions
Nov 2, 2026
Merged

kszymukowicz merged 1 commit into
release/5.0.0from
refactor-exceptions

Conversation

@kszymukowicz

Copy link
Copy Markdown
Collaborator
  • Log unexpected exceptions with an event ID. Outside of Development context HTTP 500 response contains a generic message with this event ID instead of the exception message.
  • Return PHP errors (e.g. TypeError) as API response with CORS headers instead of rethrowing them to TYPO3.
  • Return 400 Bad Request instead of HTTP 500 for invalid client input: malformed or non-object JSON body, invalid relation value, unknown order direction, missing coordinates of distance filter.
  • Validate X-Locale header: unknown or non-numeric language returns 400 Bad Request, disabled language is available only for backend users with access to it.

Fixes #38

@kszymukowicz kszymukowicz self-assigned this Nov 2, 2026
- Log unexpected exceptions with an event ID. Outside of Development context HTTP 500 response contains a generic message with this event ID instead of the exception message.
- Return PHP errors (e.g. TypeError) as API response with CORS headers instead of rethrowing them to TYPO3.
- Return 400 Bad Request instead of HTTP 500 for invalid client input: malformed or non-object JSON body, invalid relation value, unknown order direction, missing coordinates of distance filter.
- Validate X-Locale header: unknown or non-numeric language returns 400 Bad Request, disabled language is available only for backend users with access to it.

Fixes #38
@kszymukowicz
kszymukowicz merged commit 5b7f3c4 into release/5.0.0 Nov 2, 2026
25 checks passed
@kszymukowicz
kszymukowicz deleted the refactor-exceptions branch November 2, 2026 18:37
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