public function setError(Model\Error $error) {
        $errorMessage = $error->getErrorMessage();

        $this->headers->add([
            'X-Imbo-Error-Message' => $errorMessage,
            'X-Imbo-Error-InternalCode' => $error->getImboErrorCode(),
            'X-Imbo-Error-Date' => $error->getDate()->format('D, d M Y H:i:s') . ' GMT',
        ]);

        $this->setStatusCode($error->getHttpCode(), $errorMessage)
             ->setEtag(null)
             ->setLastModified(null);

        $this->setModel($error);

        return $this;
    }
public function setError(Model\Error $error) {
        $errorMessage = $error->getErrorMessage();

        $this->headers->add([
            'X-Imbo-Error-Message' => $errorMessage,
            'X-Imbo-Error-InternalCode' => $error->getImboErrorCode(),
            'X-Imbo-Error-Date' => $error->getDate()->format('D, d M Y H:i:s') . ' GMT',
        ]);

        $this->setStatusCode($error->getHttpCode(), $errorMessage)
             ->setEtag(null)
             ->setLastModified(null);

        $this->setModel($error);

        return $this;
    }
public function setError ( Model \ Error $ error ) { $ errorMessage = $ error -> getErrorMessage ( ) ; $ this -> headers -> add ( [ 'X-Imbo-Error-Message' => $ errorMessage , 'X-Imbo-Error-InternalCode' => $ error -> getImboErrorCode ( ) , 'X-Imbo-Error-Date' => $ error -> getDate ( ) -> format ( 'D, d M Y H:i:s' ) . ' GMT' , ] ) ; $ this -> setStatusCode ( $ error -> getHttpCode ( ) , $ errorMessage ) -> setEtag ( null ) -> setLastModified ( null ) ; $ this -> setModel ( $ error ) ; return $ this ; }
Set an error model and update some parts of the response object

@param Model\Error $error An error model instance
@return Response
Set an error model and update some parts of the response object