Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork136
What causes a400
error with messageServer not found for <url>
?#757
-
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:
We depend on the latest pre-release of The error message leads me to believe that I have a couple of questions:
|
BetaWas this translation helpful?Give feedback.
All reactions
the error "Server not found forhttps://vd2gh6uqw3.execute-api.us-west-2.amazonaws.com/api/user" means your OpenAPI specification doesn't define server that match url from your request.
Is BaseAPICallValidator for validating requests, responses, or both?
It's a base class for request and response validation
Why does the validator need to validate the server URL?
Server is part of OpneAPI specification
What exactly doesAPICallPathFinder._get_servers_iter do?
Finds valid server definition in your specification
What is the fundamental meaning of a ServerNotFound exception?
ServerNotFound
exception is raised when your request server does not match any defined servers i…
Replies: 1 comment 4 replies
-
the error "Server not found forhttps://vd2gh6uqw3.execute-api.us-west-2.amazonaws.com/api/user" means your OpenAPI specification doesn't define server that match url from your request.
It's a base class for request and response validation
Server is part of OpneAPI specification
Finds valid server definition in your specification
|
BetaWas this translation helpful?Give feedback.
All reactions
-
@p1c2u This answer was extremely helpful, thank you! I had posted some comments with additional questions, but I deleted them because they were based on a partial misunderstanding of how OpenAPI works. But I understand how server URLs work now and we were able to resolve the issues with our app. Thanks again for your quick response! |
BetaWas this translation helpful?Give feedback.
All reactions
-
In case anyone reading this is having a similar issue, our problem was that we have an AWS CloudFront distribution that forwards API requests to our AWS ApiGateway app. The forwarded requests have a URL like
The |
BetaWas this translation helpful?Give feedback.
All reactions
-
I'm glad you found the problem. Any suggestions about debugging improvements are welcome. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
@p1c2u I think the error message for the
I assumed that the request had failed to reach the server. I did not even realize that the error was coming from the OpenAPI spec validator. At a minimum, I think the error message should make it clear that this is an OpenAPI spec validation problem. For example, it could say something like this:
In fact, I think that all request validation errors should begin with something like |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1