@@ -88,8 +88,15 @@
},
created() {
this.err = '{{ err }}'
- this.statusCode = '{{ status_code }}' || 404
+ const statusCode = '{{ status_code }}' || 404
this.message = String({{ message | tojson }}) || 'Page not found'
+ if (statusCode == 401) {
+ console.warn(`Unauthorized: ${this.message}`)
+ this.goHome()
+ return
+ }
+ this.statusCode = statusCode
+
if (this.isExtension) {
this.extension = this.message.match(/'([^']+)'/)[1]
}