Skip to content

Commit 86d7d1e

Browse files
committed
Fixed : Show Unsensitive Error With Debug is off
1 parent 60c52f5 commit 86d7d1e

File tree

14 files changed

+23
-286739
lines changed

14 files changed

+23
-286739
lines changed

app/Exceptions/Handler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function render($request, Throwable $exception)
117117

118118
ErrorException::class => [
119119
'use' => Exception::class,
120-
'safeMessage' => __( 'An unexpected error occured while opening the app. See the log details.' ),
120+
'safeMessage' => __( 'An unexpected error occured while opening the app. See the log details or enable the debugging.' ),
121121
'code' => 503
122122
]
123123
])->map( function( $exceptionConfig, $class ) use ( $exception, $request ) {
@@ -135,7 +135,9 @@ public function render($request, Throwable $exception)
135135
], $exceptionConfig[ 'code' ] ?? 500 );
136136
}
137137

138-
return ( new $exceptionConfig[ 'use' ]( $exception->getMessage() ) )
138+
return ( new $exceptionConfig[ 'use' ](
139+
! empty( $exceptionConfig[ 'safeMessage' ] ) ? $exceptionConfig[ 'safeMessage' ] : $exception->getMessage()
140+
) )
139141
->render( $request );
140142
}
141143

public/css/app.css

Lines changed: 4 additions & 281968 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/app.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/auth.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/bootstrap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/cashier.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/dashboard.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/manifest.js

Lines changed: 2 additions & 195 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/popups.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/pos-init.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)