Show more useful info in slack messages
This commit is contained in:
parent
32a5905083
commit
aa5833a751
1 changed files with 5 additions and 2 deletions
|
@ -58,6 +58,9 @@ class Handler extends ExceptionHandler
|
|||
],
|
||||
]);
|
||||
|
||||
$exceptionName = get_class($throwable) ?? 'Unknown Exception';
|
||||
$title = $exceptionName .': ' . $throwable->getMessage();
|
||||
|
||||
$guzzle->post(
|
||||
config('logging.slack'),
|
||||
[
|
||||
|
@ -69,8 +72,8 @@ class Handler extends ExceptionHandler
|
|||
'author_name' => app()->environment(),
|
||||
'author_link' => config('app.url'),
|
||||
'fields' => [[
|
||||
'title' => get_class($throwable) ?? 'Unknown Exception',
|
||||
'value' => $throwable->getTraceAsString() ?? '',
|
||||
'title' => $title,
|
||||
'value' => request()->method() . ' ' . request()->fullUrl(),
|
||||
]],
|
||||
'ts' => time(),
|
||||
]],
|
||||
|
|
Loading…
Add table
Reference in a new issue