Currently API error codes are included as string at the end of the \Coconut\Error::message property. It would be more convenient to add an api_error_code property on the exception class, so it can easily be inspected to the php code using this library and each error can be handled differently if needed.