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

Improve input validation error messages #3752

Closed
anna-geller opened this issue May 16, 2024 · 0 comments
Closed

Improve input validation error messages #3752

anna-geller opened this issue May 16, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@anna-geller
Copy link
Member

anna-geller commented May 16, 2024

Currently, invalid inputs generate either blank error messages like this one (just 500 response without any details):

image

or not specific enough as here where input "nr" should be integer but got a string:
image

Expected outcome

The error message should clarify:

  1. For which input ID a wrong value has been provided
  2. What is the expected type
  3. What is the invalid value provided by the user

A friendlier error message schema:

Invalid input for '<input_id>': expected <expected_type> but received "<received value>"

  • Invalid input for 'nr': expected INT but received "hello"
  • Invalid input for 'payload': expected ARRAY of INT but received "[{"name": "kestra", "rating": "best in class"}]"
@anna-geller anna-geller added the bug Something isn't working label May 16, 2024
@anna-geller anna-geller modified the milestones: v0.18.0, v0.17.0 May 16, 2024
tchiotludo added a commit that referenced this issue May 24, 2024
tchiotludo added a commit that referenced this issue May 24, 2024
tchiotludo added a commit that referenced this issue May 24, 2024
tchiotludo added a commit that referenced this issue May 24, 2024
tchiotludo added a commit that referenced this issue May 24, 2024
tchiotludo added a commit that referenced this issue May 24, 2024
tchiotludo added a commit that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants