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 \App\Enums\Legacy\ApiError */ public function getApiError(): ApiError { return $this->error; } /** * Get the http code * * @return integer */ public function getStatusCode(): int { return $this->httpCode; } /** * This is used by laravel only. * It uses Log class to print the error. * * @return void */ public function report() { // @codeCoverageIgnoreStart Log::debug(sprintf('DAM API: %s', $this->getMessage())); // @codeCoverageIgnoreEnd } }