Skip to content

Curl Client does not check if response code is 200 or 201 #32

Description

@piwi91

I had an issue that I relied on your exceptions instead of the response of the CURL request. A response code of 400 couldn't be catched because there isn't an exception thrown if it occurs. An exception is only thrown when the result of the CURL request is false (https://github.com/onesky/api-library-php5/blob/master/src/Onesky/Api/Client.php#L360).
It is better to extend this check also with the CURL response code because only the expected response codes should be accepted.

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