Skip to content

Commit 0b08def

Browse files
committed
feat(ssg): report more errors
1 parent 74109af commit 0b08def

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/qwik-router/src/ssg/worker-thread.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ async function workerRender(
152152
});
153153
}
154154
} catch (e: any) {
155+
console.error('Error during stream start', staticRoute.pathname, e);
155156
routeWriter = null;
156157
result.error = {
157158
message: String(e),
@@ -166,6 +167,7 @@ async function workerRender(
166167
routeWriter.write(Buffer.from(chunk.buffer));
167168
}
168169
} catch (e: any) {
170+
console.error('Error during stream write', staticRoute.pathname, e);
169171
routeWriter = null;
170172
result.error = {
171173
message: String(e),
@@ -219,6 +221,7 @@ async function workerRender(
219221
await Promise.all(writePromises);
220222
}
221223
} catch (e: any) {
224+
console.error('Error during stream close', staticRoute.pathname, e);
222225
routeWriter = null;
223226
result.error = {
224227
message: String(e),
@@ -244,6 +247,7 @@ async function workerRender(
244247
})
245248
.then((e) => {
246249
if (e !== undefined) {
250+
console.error('Error during request handling', staticRoute.pathname, e);
247251
if (e instanceof Error) {
248252
result.error = {
249253
message: e.message,
@@ -264,6 +268,7 @@ async function workerRender(
264268

265269
pendingPromises.add(promise);
266270
} catch (e: any) {
271+
console.error('Error during render', staticRoute.pathname, e);
267272
if (e instanceof Error) {
268273
result.error = {
269274
message: e.message,

0 commit comments

Comments
 (0)