The 404 error page renders literal {errorText}

Open
#135 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 11 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
aws, javascript, node.js
Domain
api

Research direction

Find responseAsError(errorText, statusCode) in the 404 response path of the handler code. Inspect the <body> template used there and replace {{errorText}} with ${errorText} (or the equivalent interpolation used by that rendering path). Then trigger the 404 response path to verify the returned HTML shows the real error text instead of the literal {errorText}.

Written by the indexing model from the issue text.

Description

bug good first issue help wanted
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.

Dominant language
JavaScript
Stars
51
Forks
15
Avg merge
10d 13m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from activescott/serverless-aws-static-file-handler

All issues in activescott/serverless-aws-static-file-handler

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.