-
Notifications
You must be signed in to change notification settings - Fork 1
80 check for correct error handling #85
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
Conversation
The test seems to work as it should. Found error in edrisobaric schema. In attempting to fix it I found this: fastapi/fastapi#6799 Not sure if that's enough to fix it, but it seems like a hack. If this is hard to get right, perhaps it should only be a warning until --strict is used? |
sedr/metoceanprofilecore10.py
Outdated
) | ||
if not error_response_schema: | ||
errors += ( | ||
f"4XX response for {method.upper()} {path} is not valid. Media-type shall be 'application/problem+json'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand this correctly, it's checking the openapi schema, not an actual response. I don't think that is apparent from the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the error message. For now, its just checking the media-type. We should maybe check the json response as well, but I think maybe we can add that later. Not sure exactly what to check there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Perhaps create an issue for doing it some time in the future?
Yes, you might be right about that. I will update. |
What are all the timeout changes? Did you have trouble with timeouts? Don't we have a general --timeout argument for this? |
Had some timeout issues yes, so I just increased the defaults. But yes, all these should use |
The idea here is that for some things, as in error handling, its easier to check for compliance by: