Skip to content

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

RGO230
Copy link
Contributor

@RGO230 RGO230 commented Jul 2, 2025

@RGO230 RGO230 self-assigned this Jul 2, 2025
@RGO230 RGO230 assigned AZabolotnikov and RGO230 and unassigned RGO230 and AZabolotnikov Jul 3, 2025
@RGO230 RGO230 assigned AZabolotnikov and unassigned RGO230 Jul 9, 2025
Copy link

sonarqubecloud bot commented Jul 9, 2025

} catch (Exception $exception) {
return $this->generateEmptyData($this->config['defaults']['error'], ['message' => $exception->getMessage()]);
} catch (Throwable $exception) {
$message = $exception instanceof Exception ? $exception->getMessage() : '[]';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$message = $exception instanceof Exception ? $exception->getMessage() : '[]';
$message = ($exception instanceof Exception) ? $exception->getMessage() : '[]';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RGO230 @DenTray

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 []

@AZabolotnikov AZabolotnikov assigned DenTray and RGO230 and unassigned AZabolotnikov Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants