Confusing error codes
nickkraakman opened this issue · 0 comments
nickkraakman commented
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.