-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b8e662
commit e84f8cb
Showing
3 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
<template> | ||
<NuxtLayout> | ||
<VioError | ||
:status-code="error?.statusCode ? +error?.statusCode : undefined" | ||
:status-code="error.statusCode" | ||
:status-message="error.statusMessage" | ||
:description="error.message" | ||
:stack="error.stack" | ||
/> | ||
</NuxtLayout> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
export type Error = { statusCode: string } | ||
import { NuxtError } from 'nuxt/app' | ||
export interface Props { | ||
error?: Error | ||
error: NuxtError | ||
} | ||
const props = withDefaults(defineProps<Props>(), { | ||
error: undefined, | ||
}) | ||
const props = withDefaults(defineProps<Props>(), {}) | ||
useHead({ | ||
title: props.error?.statusCode?.toString(), | ||
title: `${props.error.statusCode} - ${props.error.message}`, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters