Skip to content

Commit

Permalink
Fixed : Show Unsensitive Error With Debug is off
Browse files Browse the repository at this point in the history
  • Loading branch information
Blair2004 committed Oct 9, 2021
1 parent 60c52f5 commit 86d7d1e
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 286,739 deletions.
6 changes: 4 additions & 2 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function render($request, Throwable $exception)

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

return ( new $exceptionConfig[ 'use' ]( $exception->getMessage() ) )
return ( new $exceptionConfig[ 'use' ](
! empty( $exceptionConfig[ 'safeMessage' ] ) ? $exceptionConfig[ 'safeMessage' ] : $exception->getMessage()
) )
->render( $request );
}

Expand Down
281,972 changes: 4 additions & 281,968 deletions public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/auth.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/bootstrap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/cashier.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/dashboard.min.js

Large diffs are not rendered by default.

197 changes: 2 additions & 195 deletions public/js/manifest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/js/popups.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/pos-init.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/pos.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/setup.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/update.min.js

Large diffs are not rendered by default.

4,567 changes: 3 additions & 4,564 deletions public/js/vendor.js

Large diffs are not rendered by default.

0 comments on commit 86d7d1e

Please sign in to comment.