-
Notifications
You must be signed in to change notification settings - Fork 47
163 modify 500 code error response page #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…hub.com/RonasIT/laravel-swagger into 163-modify-500-code-error-response-page
|
} catch (Exception $exception) { | ||
return $this->generateEmptyData($this->config['defaults']['error'], ['message' => $exception->getMessage()]); | ||
} catch (Throwable $exception) { | ||
$message = $exception instanceof Exception ? $exception->getMessage() : '[]'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$message = $exception instanceof Exception ? $exception->getMessage() : '[]'; | |
$message = ($exception instanceof Exception) ? $exception->getMessage() : '[]'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we can't always write message?
For me always show $exception->getMessage() is fine. What are we trying to hide here?
if we trying hide only next Throwable message 'RonasIT\AutoDoc\Drivers\LocalDriver::getDocumentation(): Return value must be of type array, null returned'. Maybe we can write like kind "Documentation file is empty or have bad format" insted []
#163