Skip to content

Default client error lacks context which is the failing operation #2945

@petar-dochev-f3

Description

@petar-dochev-f3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions