-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
[Bug]: Error desc not specifying what went wrong #711
Comments
So i pinpointed the problem, my request uses basic auth, i was encoding user/pass with base64 which caused the above problem, still the error is really not as expected |
Hi @itsMGA thanks for the report. Please provide working example with full traceback. |
I found you have to dig a little deeper into the exceptions to get the exact problem. OpenApiError has a |
I was able to get some more information about a failed validation for my cases by calling In one case I got a RequestBodyValidationError which returns a "Request body validation error" string.
and inspecting it showed an AttributeError, as "'dict' object has no attribute ' In another case I got a CastError, and
(with entire json body) Anyway, these maneuvers just don't feel right. Validation result should be something more readable and easily accessible. If there is a better way, but I haven't found it yet. |
Actual Behavior
So i use:
To validate request data versus schema:
Here's the snipped for request body:
My request:
r = requests.post(url='host/something/v012/get', data={'type_of': 'user', 'name': 'test'})
The error message raised is:
Not sure what's wrong based on the error desc
Do you guys know a better way to see more exact error descriotion (what's wrong with the request data vs yaml?)
Openapi_core version 0.18.1
Expected Behavior
Exected to isolate or relate what was not ok from request data vs yaml schema
Steps to Reproduce
Not sure what is wrong with my request yet
OpenAPI Core Version
0.18.1
OpenAPI Core Integration
requests
Affected Area(s)
No response
References
No response
Anything else we need to know?
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: