Skip to content

Adding hasRequestFailed() method to connector always throws an exception #511

@bvtrfly

Description

@bvtrfly

I am currently integrating with an external API that returns a 200 OK status for every request, even when the request has actually failed. To handle this, I added a hasRequestFailed method to the connector.

However, I've noticed that if the logic inside hasRequestFailed evaluates to true, an exception is immediately thrown when the request is sent. As a result, the code never reaches the point where it checks whether the request has failed — the error is raised at the point of sending the request itself.

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