Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Unhandled exception mapping for javax.validation.ValidationException #189

Open
jsenko opened this issue Oct 13, 2021 · 2 comments
Open

Unhandled exception mapping for javax.validation.ValidationException #189

jsenko opened this issue Oct 13, 2021 · 2 comments
Assignees

Comments

@jsenko
Copy link
Member

jsenko commented Oct 13, 2021

Examples from logs:

  • Returning an HTTP 5xx error code because: javax.validation.ValidationException: invalid orderBy
  • Returning an HTTP 5xx error code because: javax.validation.ValidationException: Invalid search query. Currently search supports only single key=value strings pair
  • Returning an HTTP 5xx error code because: java.lang.IllegalArgumentException: fromKey > toKey
@wtrocki
Copy link
Contributor

wtrocki commented Oct 13, 2021

For simplicity I would typically map them to the same error code - invalid user input %field
We do not need multiple error codes unless we want to return meaning - Value to small etc.

@famarting
Copy link
Contributor

related to this #181 , no?

@jsenko jsenko self-assigned this Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants