mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
35 lines
850 B
PHP
35 lines
850 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Laminas\Stratigility\Middleware\ErrorHandler;
|
|
use Mezzio\ProblemDetails\ProblemDetailsMiddleware;
|
|
use Shlinkio\Shlink\Common\Logger;
|
|
|
|
use function Shlinkio\Shlink\Core\toProblemDetailsType;
|
|
|
|
return [
|
|
|
|
'problem-details' => [
|
|
'default_types_map' => [
|
|
404 => toProblemDetailsType('not-found'),
|
|
500 => toProblemDetailsType('internal-server-error'),
|
|
],
|
|
],
|
|
|
|
'error_handler' => [
|
|
'listeners' => [Logger\ErrorLogger::class],
|
|
],
|
|
|
|
'dependencies' => [
|
|
'delegators' => [
|
|
ErrorHandler::class => [
|
|
Logger\ErrorHandlerListenerAttachingDelegator::class,
|
|
],
|
|
ProblemDetailsMiddleware::class => [
|
|
Logger\ErrorHandlerListenerAttachingDelegator::class,
|
|
],
|
|
],
|
|
],
|
|
|
|
];
|