rororo
rororo copied to clipboard
Better errors
As of 2.0.0a2
version rororo
does not provide any specific error message on validation error, it fully relies on openapi-core
and later on which error middleware used in aiohttp.web
application (if any).
Need to change this and return the predefined error response if some of request parameters or body is not valid (and same for response after #13 is done).
TODO:
- [x] Security error
- [x] Request parameter validation error
- [x] Request body validation error
- [x] Response validation error
- [x] Multiple validation errors
- [x] Multiple validation errors in case of missing multiple required fields
- [ ] Allow to localize high level error messages
- [x] Documentation for error handling & custom errors
For a moment openapi-core==0.12.0
doesn't have an ability to provide an info about multiple validation errors, however master
of openapi-core
contains this feature, which means next version of openapi-core
will allow rororo
to fetch all available validation errors, not only first one.
Reference: https://github.com/p1c2u/openapi-core/issues/178
As of openapi-core==0.13.3
it is able to provide details about multiple validation errors.
2.0.0rc0
contain solid base for handling errors, only localizing errors is still missing, but this shouldn't freeze the 2.0.0
release.
Is this issue still ongoing? I can't seem to figure out how to log request validation errors for this library.