diff --git a/lnbits/templates/error.html b/lnbits/templates/error.html index 6d5a9afa..6fdb8bcd 100644 --- a/lnbits/templates/error.html +++ b/lnbits/templates/error.html @@ -6,7 +6,7 @@ > {% block page %}
-
+
@@ -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] }