Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: better html streaming error #7105

Open
wants to merge 1 commit into
base: build/v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/proud-pillows-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@qwik.dev/core': patch
---

chore: more descriptive HTML streaming error message
6 changes: 4 additions & 2 deletions packages/qwik/src/core/shared/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,10 @@ function choreComparator(a: Chore, b: Chore, shouldThrowOnHostMismatch: boolean)
// On server we can't schedule task for a different host!
// Server is SSR, and therefore scheduling for anything but the current host
// implies that things need to be re-run nad that is not supported because of streaming.
const errorMessage =
'SERVER: during HTML streaming, it is not possible to cause a re-run of tasks on a different host';
const errorMessage = `SERVER: during HTML streaming, it is not possible to cause a re-run of tasks on a different host.
You are trying to modify node which was already streamed to the client.
This means that in the CSR mode it can be different from the SSR.
Current Node: ${aHost.toString()}`;
if (shouldThrowOnHostMismatch) {
throwErrorAndStop(errorMessage);
}
Expand Down
Loading