serverless-aws-static-file-handler icon indicating copy to clipboard operation
serverless-aws-static-file-handler copied to clipboard

The 404 error page renders literal {errorText}

Open iridiankin opened this issue 2 years ago • 1 comments

Expected behavior:

The 404 result presents the actual internal error text in development environments

Actual behavior:

Literal {errorText} is rendered which is a bit less than useful for debugging purposes.

Steps to fix the problem:

In async responseAsError(errorText, statusCode) replace

  <body>
    {{errorText}}
  </body>

with

  <body>
    ${errorText}
  </body>

or similar.

iridiankin avatar Feb 17 '22 10:02 iridiankin