Add Original message from Exception to the error page

This commit is contained in:
Bubka 2020-11-14 18:36:44 +01:00
parent 886d5a5e22
commit 9dd8b1f169
2 changed files with 3 additions and 2 deletions

View File

@ -129,7 +129,7 @@ private function customApiResponse($exception, $debug)
break;
default:
$response['message'] = ($statusCode >= 500) ? 'Whoops, looks like something went wrong' : $exception->getMessage();
$response['message'] = ($statusCode >= 500) ? 'Whoops, looks like something went wrong :(' : $exception->getMessage();
if (config('app.debug')) {
$response['originalMessage'] = $exception->getMessage();

View File

@ -16,8 +16,9 @@
</div>
<div v-else>
<p class="error-generic"></p>
<p>{{ $t('errors.error_occured') }}</p>
<p>{{ $t('errors.error_occured') }} </p>
<p v-if="error" class="has-text-grey-lighter">{{ error.message }}</p>
<p v-if="error.originalMessage" class="has-text-grey-lighter">{{ error.originalMessage }}</p>
<p><router-link :to="{ name: 'accounts' }" class="is-text">{{ $t('errors.refresh') }}</router-link></p>
<p v-if="debugMode == 'development' && error.debug">
<br>