Having fun with the default Worker script…here’s a quick fix to make the http.cat example better behave:
Thanks for sharing this - I will flag it up to our Workers team internally to take a look at.
Looks like your code change renders an error message instead of the 404 cat for invalid status codes like
12345 at the cost of additional variables and lines of code. Our goal with the default script is simplicity and conciseness, so every line of code counts! This small change in user experience doesn’t justify the cost of the added complexity, so we’ll stick with the current implementation, but we do appreciate the input.
OK, no worries. To me it seems more logical to not return 200 with a 404 image for 12345. But I get simplicity too.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.