-
Notifications
You must be signed in to change notification settings - Fork 19
Idea: Handling 404 Errors #227
Comments
Looking into this, I'm wondering how to test the I tried a simple default helix site with
I may be lacking some documentation on how to use the |
I'd look into the helix-simulator, it's using a node-esi module to implement ESI. You'd definitely put the ESI tags into the HTL, but I'm not sure why your request hangs. |
Maybe it should be |
@rofe tried both. also tried self-closing tags ( |
@trieloff can ESIs even be static resources? I thought they have to correspond to an |
they can be anything. they are just refetched, going through the entire request processing again. i.e. request /foo.html -> request /404.html -> request /404.html .... |
Graceful error handling with custom pages and proper fallback fix #227
Add unit test to verify graceful handling of missing 404.md error page fix #227
So far, I have the following use cases covered:
What I have not covered yet is serving a static |
it works, when you put the 404.html in |
btw, this is actually a problem :-) relying on a 404 to fallback to the static resolution.
Can we do the 404 handing in fastly https://docs.fastly.com/guides/basic-configuration/creating-error-pages-with-custom-responses ? |
We could return a
|
no, the problem is, that if we want to serve static html from htdocs (which is a requirement for the 404.html and also what @davidnuescheler wants), then we cannot use the 404 error handler in pipeline at all. because any 404 returned from the pipeline, VCL needs to try to fetch the static content. |
So for Helix Pages, |
I don't think this is really cool, since the error page most certainly needs a different script/template than the original requested page. using the IMO, the proper way would be to handle the 404 processing in fastly at the end of the processing chain. the simplest idea would be to locally render a another idea: we could implement the |
We already use custom error pages in Fastly, so having |
Not sure how to move forward with this. Should I just go ahead and close so we focus on implementing this outside of the pipeline? |
Yes, this is superseded by adobe/helix-publish#96 |
Here's an idea on handling 404 errors in a Helix-ish way.
Assumptions:
fetch
stepSolution:
fetch
step, add anothererror
step, which will do the following<esi:include src="404.html">
404.html
from thestatic
repo, giving you full customizability, or go back to the html pipeline, which is this time retrieving404.md
from thecontent
repository and renders itOpen Questions:
404.md
doesn't exist404.html
The text was updated successfully, but these errors were encountered: