handle($request); } catch (Exception $exception) { $this->logger->notice($exception); } catch (Error $error) { $this->logger->error($error); } $response = $this->responseFactory->createResponse(404); if (str_contains($request->getUri()->getPath(), '/api')) { return $response; } return $this->view->render($response, 'construccion'); } }