error = $error; $this->message = $message; $this->httpCode = $httpCode; parent::__construct( strlen($this->message) ? $this->message : $error->label, $error->value, $previous ); } /** * Get the Api Error * * @return ApiError */ public function getApiError(): ApiError { return $this->error; } /** * Get the http code * * @return int */ public function getStatusCode(): int { return $this->httpCode; } public function report() { Log::debug(sprintf('CRM API: %s', $this->getMessage())); } }