diff --git a/src/worker.ts b/src/worker.ts index bb3485b..195ce31 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -116,41 +116,60 @@ class MeteorServiceWorker { }) } catch (error) { self.$meteor.util.log(error, '#FF5757') - return this.renderError(error, version) + const url = self.$meteor.rewrite.url.decode(request.url) + return this.renderError(error, url, version) } } - renderError(error: Error, version: string) { + renderError(error: Error, url: string, version: string) { return new Response( - typeof self.$meteor.config.errorPage === 'string' - ? self.$meteor.config.errorPage - : ` + ` - ${self.$meteor.config.errorPage?.head || ''} - Error - + + Something went wrong + -

Something went wrong

-

Uh oh - something occured that prevented Meteor from processing your request.

- -

Meteor ${version}

+
+
+ + + +

+ Something went wrong +

+

+ Meteor ran into an error while processing your request. +

+
+

URL: ${url}

+

Version: ${version}

+
${error}
+
+ + + Report Error + +
+
+
+
`,