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

Improve error messages from error handlers #787

Open
p1c2u opened this issue Feb 13, 2024 Discussed in #757 · 0 comments
Open

Improve error messages from error handlers #787

p1c2u opened this issue Feb 13, 2024 Discussed in #757 · 0 comments
Labels
area/contrib Indicates an issue on contrib area.
Milestone

Comments

@p1c2u
Copy link
Collaborator

p1c2u commented Feb 13, 2024

Discussed in #757

Originally posted by jtherrmann January 11, 2024
All of the API endpoints for the test deployment of our Flask app, which is deployed via Amazon API Gateway, are currently returning a response like the one below:

{
  "detail": "Server not found for https://vd2gh6uqw3.execute-api.us-west-2.amazonaws.com/api/user",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}

We depend on the latest pre-release of openapi-core, https://github.com/python-openapi/openapi-core/releases/tag/0.19.0a1.

The error message leads me to believe that openapi-core is raising a ServerNotFound exception from BasePathFinder.find (here), which is called from BaseAPICallValidator._find_path (here).

I have a couple of questions:

  • Is BaseAPICallValidator for validating requests, responses, or both?
  • Why does the validator need to validate the server URL? What exactly does APICallPathFinder._get_servers_iter do? What is the fundamental meaning of a ServerNotFound exception?
@p1c2u p1c2u added the area/contrib Indicates an issue on contrib area. label Feb 13, 2024
@p1c2u p1c2u added this to the 1.0.0 milestone Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/contrib Indicates an issue on contrib area.
Projects
None yet
Development

No branches or pull requests

1 participant