Imbo\Http\Response\Formatter\JSON::formatError PHP Method

formatError() public method

public formatError ( Error $model )
$model Imbo\Model\Error
    public function formatError(Model\Error $model)
    {
        $data = ['error' => ['code' => $model->getHttpCode(), 'message' => $model->getErrorMessage(), 'date' => $this->dateFormatter->formatDate($model->getDate()), 'imboErrorCode' => $model->getImboErrorCode()]];
        if ($imageIdentifier = $model->getImageIdentifier()) {
            $data['imageIdentifier'] = $imageIdentifier;
        }
        return $this->encode($data);
    }