Mas datos en el registro de accessos
This commit is contained in:
@ -18,7 +18,11 @@ class NotAllowed
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return $handler->handle($request);
|
return $handler->handle($request);
|
||||||
} catch (HttpMethodNotAllowedException) {
|
} catch (HttpMethodNotAllowedException $exception) {
|
||||||
|
$this->logger->warning($exception, [
|
||||||
|
'Server' => $request->getServerParams(),
|
||||||
|
'Headers' => $request->getHeaders(),
|
||||||
|
]);
|
||||||
$response = $this->responseFactory->createResponse(405, 'Method Not Allowed');
|
$response = $this->responseFactory->createResponse(405, 'Method Not Allowed');
|
||||||
if (str_contains($request->getUri()->getPath(), '/api')) {
|
if (str_contains($request->getUri()->getPath(), '/api')) {
|
||||||
return $response;
|
return $response;
|
||||||
|
@ -21,7 +21,10 @@ class NotFound
|
|||||||
return $handler->handle($request);
|
return $handler->handle($request);
|
||||||
} catch (HttpNotFoundException |
|
} catch (HttpNotFoundException |
|
||||||
EmptyRedis | EmptyResult | Read | Create | Update | Delete $exception) {
|
EmptyRedis | EmptyResult | Read | Create | Update | Delete $exception) {
|
||||||
$this->logger->notice($exception);
|
$this->logger->notice($exception, [
|
||||||
|
'Server' => $request->getServerParams(),
|
||||||
|
'Headers' => $request->getHeaders(),
|
||||||
|
]);
|
||||||
$response = $this->responseFactory->createResponse(404, 'Not Found');
|
$response = $this->responseFactory->createResponse(404, 'Not Found');
|
||||||
if (str_contains($request->getUri()->getPath(), '/api')) {
|
if (str_contains($request->getUri()->getPath(), '/api')) {
|
||||||
return $response;
|
return $response;
|
||||||
|
Reference in New Issue
Block a user