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
Currently Astro doesn't handle errors that are thrown in imported components. The node adapter tries rendering the component, but throws out only an error: net::ERR_INVALID_CHUNKED_ENCODING 200 (OK). So the server response is 200, though the runtime error is not caught.
The problem seems to be in streaming chunks where one of them is broken. The node adapter's asyncIteratorfunction can be extended to catch these errors. It ends up in the dist/server/entry.mjs.
It would be best if we could either disable streaming or have some error catching in the adapter code so not to render a blank screen.
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
povilas-juodzevicius
changed the title
Errors not caught in imported components
Errors not caught in imported components / streaming broken chunks
Apr 24, 2023
What version of
astro
are you using?2.3.0
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
Currently Astro doesn't handle errors that are thrown in imported components. The node adapter tries rendering the component, but throws out only an error:
net::ERR_INVALID_CHUNKED_ENCODING 200 (OK)
. So the server response is 200, though the runtime error is not caught.The problem seems to be in streaming chunks where one of them is broken. The node adapter's
asyncIterator
function can be extended to catch these errors. It ends up in thedist/server/entry.mjs
.It would be best if we could either disable streaming or have some error catching in the adapter code so not to render a blank screen.
Link to Minimal Reproducible Example
https://github.com/povilas-juodzevicius/astro-runtime-error-repro
Participation
The text was updated successfully, but these errors were encountered: