mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +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>
|