mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-05 03:47:12 +00:00
12 lines
245 B
Vue
12 lines
245 B
Vue
|
<template>
|
||
|
<h1>Async Data Error</h1>
|
||
|
</template>
|
||
|
<script>
|
||
|
export default {
|
||
|
async asyncData ({ error }) {
|
||
|
await new Promise(resolve => setTimeout(resolve, 2000))
|
||
|
error({ statusCode: 401, message: 'Not allowed here' })
|
||
|
}
|
||
|
}
|
||
|
</script>
|