Title: What causes a `400` error with message `Server not found for
Open Graph Title: What causes a `400` error with message `Server not found for
X Title: What causes a `400` error with message `Server not found for
Description: What causes a `400` error with message `Server not found for
Open Graph Description: 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...
X Description: 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": "Serve...
Opengraph URL: https://github.com/python-openapi/openapi-core/discussions/757
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"What causes a `400` error with message `Server not found for `?","text":"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:
\n{\n \"detail\": \"Server not found for https://vd2gh6uqw3.execute-api.us-west-2.amazonaws.com/api/user\",\n \"status\": 400,\n \"title\": \"Bad Request\",\n \"type\": \"about:blank\"\n}\n
\nWe depend on the latest pre-release of openapi-core, https://github.com/python-openapi/openapi-core/releases/tag/0.19.0a1.
\nThe 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).
\nI have a couple of questions:
\n\n- Is
BaseAPICallValidator for validating requests, responses, or both? \n- 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? \n
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"HI @jtherrmann
\nthe error \"Server not found for https://vd2gh6uqw3.execute-api.us-west-2.amazonaws.com/api/user\" means your OpenAPI specification doesn't define server that match url from your request.
\n\nIs BaseAPICallValidator for validating requests, responses, or both?
\n
\nIt's a base class for request and response validation
\n\nWhy does the validator need to validate the server URL?
\n
\nServer is part of OpneAPI specification
\n\nWhat exactly does APICallPathFinder._get_servers_iter do?
\n
\nFinds valid server definition in your specification
\n\nWhat is the fundamental meaning of a ServerNotFound exception?
\n
\nServerNotFound exception is raised when your request server does not match any defined servers in your specification.
","upvoteCount":2,"url":"https://github.com/python-openapi/openapi-core/discussions/757#discussioncomment-8092412"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:67b2f7ef-bf14-fe31-453f-f96a5c60a707 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | B78C:1E8736:A757E4:E2ED74:69785B4B |
| html-safe-nonce | 6620ffa3706f498ae61ee960e29c482bb8fdaea6a0d1e5a7a68ad069f663f21e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzhDOjFFODczNjpBNzU3RTQ6RTJFRDc0OjY5Nzg1QjRCIiwidmlzaXRvcl9pZCI6IjU5NTI0ODIyNTc3NTc4MjE3NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cfd598037fd2e8162b0cd81cbec0e718556268f104b9e1afbd06488212d41889 |
| hovercard-subject-tag | discussion:6058828 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/python-openapi/openapi-core/757/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/f0c91524300b9993e26693a2c694f84f66daa2d9f0dd4da788bc73840506169b/python-openapi/openapi-core/discussions/757 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f0c91524300b9993e26693a2c694f84f66daa2d9f0dd4da788bc73840506169b/python-openapi/openapi-core/discussions/757 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openapi/openapi-core git https://github.com/python-openapi/openapi-core.git |
| octolytics-dimension-user_id | 126442889 |
| octolytics-dimension-user_login | python-openapi |
| octolytics-dimension-repository_id | 104200746 |
| octolytics-dimension-repository_nwo | python-openapi/openapi-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 104200746 |
| octolytics-dimension-repository_network_root_nwo | python-openapi/openapi-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 520b65a872113b919c1bbdb03834a50af15859fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width