Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
299
Merge Requests
37
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
6c9a3854
Commit
6c9a3854
authored
1 hour ago
by
Emiliano Balbuena
Browse files
Options
Download
(feat): PSR-7 Router exceptions to Sentry
parent
ee7b48e1
epic/modern-router
1 merge request
!342
WIP: (feat): Modernize Router (&75)
Pipeline
#100053964
passed with stages
in 7 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Core/Router/Middleware/Kernel/ErrorHandlerMiddleware.php
View file @
6c9a3854
...
...
@@ -15,6 +15,7 @@ use Psr\Http\Server\MiddlewareInterface;
use
Psr\Http\Server\RequestHandlerInterface
;
use
Zend\Diactoros\Response\HtmlResponse
;
use
Zend\Diactoros\Response\JsonResponse
;
use
function
Sentry\captureException
;
class
ErrorHandlerMiddleware
implements
MiddlewareInterface
{
...
...
@@ -43,10 +44,14 @@ class ErrorHandlerMiddleware implements MiddlewareInterface
$message
=
'Forbidden'
;
$status
=
403
;
}
catch
(
Exception
$e
)
{
//
TODO: Handle Sentry
//
Log
// TODO: Monolog
error_log
((
string
)
$e
);
// TODO: Nicer logging
// Sentry
captureException
(
$e
);
}
switch
(
$request
->
getAttribute
(
'accept'
))
{
...
...
This diff is collapsed.
Please
register
or
sign in
to comment