cloudflare / cloudflare/worker-sites-template

Handle funky 404s correctly

Open
#67 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
79
Forks
40
PR merge metrics
No merged PRs in 30d

Description

In the event of a missing asset in KV (but where it is found in the manifest), we should probably just do default 404 behavior. Right now, we'll return a 500.

https://github.com/cloudflare/kv-asset-handler/blob/821dc0c45a9d750c4922c8bbece724df79dfa9b5/src/index.ts#L271 throws the error.

https://github.com/cloudflare/worker-sites-template/blob/dd042daba3d6e1e1da1bd56dbf01be642b4870c3/workers-site/index.js#L58 will then return a 500 response.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.