Skip to content

Improve error messages from error handlers #787

Open
@p1c2u

Description

@p1c2u

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/contribIndicates an issue on contrib area.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy