We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6116d42 + a547163 commit 6ba4f5aCopy full SHA for 6ba4f5a
src/Traits/ApiErrorHandler.php
@@ -9,7 +9,7 @@ trait ApiErrorHandler
9
{
10
public function handleError($exception)
11
12
- $exceptions = config("api-error-handler");
+ $exceptions = config("api-error-handler") ?? [];
13
$class = array_key_exists(get_class($exception),$exceptions) ? $exceptions[get_class($exception)] : DefaultException::class;
14
$handler = new $class($exception);
15
$handler->handleStatusCode();
0 commit comments