-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Problem statement
If an API call returns a status code that is not defined in the swagger spec, we get an error message like following:
response status code does not match any response statuses defined for this endpoint in the swagger spec (status 503): {}
This lacks context which is the failing operation. A program may call many different APIs, then it is hard to tell which is the failing one.
While this context can be added in the application code making the call, it would require changes in all the places the application makes some API calls. It would be more efficient to handle this in a single place. Also the information about the API operation being executed is available in the swagger client.
Ideally the error message would contain the failing request method and complete URL.
Swagger specification
Any swagger spec without a default response.
Steps to reproduce
Call an API operation that returns a status code that is not defined in the swagger spec.