Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing error codes #45

Open
nickkraakman opened this issue Jun 10, 2024 · 0 comments
Open

Confusing error codes #45

nickkraakman opened this issue Jun 10, 2024 · 0 comments

Comments

@nickkraakman
Copy link
Contributor

nickkraakman commented Jun 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant