You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow to pass custom fetch for fetching pre-rendered errors (#13403)
* Allow to pass custom fetch for fetching pre-rendered errors
* Add changeset
* Update lockfile
* Update .changeset/big-hats-train.md
* Add JSDoc to the new param
* Commit suggested rephrase
* Change the suffix of the sentence
* Correct the test, it was using proper fetch signature, which is not actually what we need
* Add a more strict type to the error page path
* State explicitly that it's only 404 or 500
* Rephrase the JSdoc
* rename to `prerenderedErrorPageFetch`
* rename to `prerenderedErrorPageFetch`
* Update .changeset/big-hats-train.md
Co-authored-by: Sarah Rainsberger <[email protected]>
* update the changeset
* update tests
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <[email protected]>
* Update .changeset/big-hats-train.md
Co-authored-by: Matt Kane <[email protected]>
---------
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
Adds a new optional `prerenderedErrorPageFetch` option in the Adapter API to allow adapters to provide custom implementations for fetching prerendered error pages.
6
+
7
+
Now, adapters can override the default `fetch()` behavior, for example when `fetch()` is unavailable or when you cannot call the server from itself.
8
+
9
+
The following example provides a custom fetch for `500.html` and `404.html`, reading them from disk instead of performing an HTTP call:
0 commit comments