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 || ''} -Meteor ${version}
++ Meteor ran into an error while processing your request. +
+ +