| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
| 26 | { |
||
| 27 | try { |
||
| 28 | return $handler->handle($request); |
||
| 29 | } catch (ApplicationException $e) { |
||
| 30 | $code = $this->httpExceptionMapper->getCode($e); |
||
| 31 | |||
| 32 | return $this->dataResponseFactory->createResponse($e->getMessage(), $code); |
||
| 33 | } catch (RequestValidationException $e) { |
||
| 34 | return $this->dataResponseFactory->createResponse($e->getFirstError(), Status::BAD_REQUEST); |
||
| 35 | } |
||
| 38 |