Skip to content

Confusing error codes #45

@nickkraakman

Description

@nickkraakman

An example API error response would be:

404 Not Found
{ "error": true, "error_code": 8, "error_message": "Not implemented" }

This matches what is described in the docs, and returns both an HTTP status code and a Picqer specific error code.

However, the PHP Client returns does:

$result['error'] = true;
$result['errorcode'] = $headerInfo['http_code'];
$result['errormessage'] = $apiResult;

So from the docs we expected error_code, yet we got errorcode (no underscore), and we also expected this to be the Picqer specific error code, but instead it is set to the http_code from the header, so we don't have access to the Picqer specific error code at all in this response.

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