bigcommerce-api-php icon indicating copy to clipboard operation
bigcommerce-api-php copied to clipboard

getLastError returns array with "status"

Open jkelly-cas opened this issue 10 years ago • 0 comments

var_dump( Bigcommerce::getLastError() );

array(1) { [0]=> object(stdClass) (2) { ["status"]=> int(400) ["message"]=> string(28) "The field 'type' is invalid." } }

returns 'status' and not 'code' as per your documentation.

Furthermore, it also returns inside an array, so echo $error[0]->status instead of $error->status.

also see: https://github.com/bigcommerce/bigcommerce-api-php/issues/77

jkelly-cas avatar Nov 11 '15 00:11 jkelly-cas