mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Improve error handling when string
This commit is contained in:
parent
4cbd6d6a28
commit
615bcae90c
@ -68,6 +68,9 @@ const app = {
|
||||
err: null,
|
||||
error (err) {
|
||||
err = err || null
|
||||
if (typeof err === 'string') {
|
||||
err = { statusCode: 500, message: err }
|
||||
}
|
||||
this.$options._nuxt.err = err;
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user