/** * @inheritdoc */ public function error($errors, $defaultStatusCode = null, array $headers = []) { if (is_string($errors) && !empty($errors)) { $errors = $this->errors->error($errors); } $response = new ErrorResponse($errors, $defaultStatusCode, $headers); return $this->errors($response); }
/** * @return ErrorInterface */ protected function getDefaultError() { return $this->errors->error(Exception::class); }