Skip to content

Inconsistent exception classes used across "ClientInterface" implementations #90

@aik099

Description

@aik099

The CurlClient is:

  • throwing \Exception when unsupported AuthenticationInterface implementation given
  • throwing \chobie\Jira\Api\UnauthorizedException exception, when user can't be authorized
  • throwing \chobie\Jira\Api\Exception in other cases

The PHPClient however is throwing \Exception in all cases, which makes it impossible to write code (that uses this library), that would catch specific exception types and would continue to work when client of the library would be switched from CurlClient to the PHPClient.

In particular this break logic of Walker::valid method, because it catches \chobie\Jira\Api\UnauthorizedException exception specifically.

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