-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unclear error message for failed response model validation #750
Comments
@drnextgis can you be a bit more verbose. which version of stac-fastapi, which backend, which endpoint? |
Oh I see, you're saying we should try to make the error message a bit more verbose 😓 I guess https://github.com/stac-utils/stac-fastapi/blob/main/stac_fastapi/api/stac_fastapi/api/errors.py#L49-L97 needs to be updated |
Exactly, having the name of the property that failed validation would be extremely helpful. |
FYI we do need to change https://github.com/stac-utils/stac-fastapi/blob/main/stac_fastapi/api/stac_fastapi/api/errors.py#L87-L93 because it returns validation error message in a weird (non-JSON) form:
|
Looks like there is a |
When response model validation is enabled, the API returns an unclear error message that doesn't specify which property failed validation. For example:
In this case, the issue was caused by the asset href containing a number instead of a string.
The text was updated successfully, but these errors were encountered: