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(
|
$guzzle->post(
|
||||||
config('logging.slack'),
|
config('logging.slack'),
|
||||||
[
|
[
|
||||||
|
@ -69,8 +72,8 @@ class Handler extends ExceptionHandler
|
||||||
'author_name' => app()->environment(),
|
'author_name' => app()->environment(),
|
||||||
'author_link' => config('app.url'),
|
'author_link' => config('app.url'),
|
||||||
'fields' => [[
|
'fields' => [[
|
||||||
'title' => get_class($throwable) ?? 'Unknown Exception',
|
'title' => $title,
|
||||||
'value' => $throwable->getTraceAsString() ?? '',
|
'value' => request()->method() . ' ' . request()->fullUrl(),
|
||||||
]],
|
]],
|
||||||
'ts' => time(),
|
'ts' => time(),
|
||||||
]],
|
]],
|
||||||
|
|
Loading…
Add table
Reference in a new issue