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

fix: ensure we catch all OpenAPIParser::OpenAPIError classes when coercing path parameters for OpenAPI 3 #228

Merged
merged 2 commits into from
Jul 18, 2019

Conversation

mt-kelvintaywl
Copy link
Contributor

@mt-kelvintaywl mt-kelvintaywl commented Jul 18, 2019

bug summary

I found that when we send a request with path

/resource/{id}/...

while a missing ID will be wrapped into a Committee::InvalidRequest error, an existing but invalid ID will still be uncaught; This gets bubbled up as an OpenAPIParser::ValidateError instead.

I think for consistency, we can catch all OpenAPIParser::OpenAPIError in the rescue operation.

Related PR: #225

@ota42y
Copy link
Member

ota42y commented Jul 18, 2019

Oh our error handling was not good, thank you!

@ota42y ota42y merged commit 0822682 into interagent:master Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants