Skip to content

Commit e9bcbe4

Browse files
committed
fix: wrap writer.write in try/catch to handle client disconnect during deploy
1 parent 64729bb commit e9bcbe4

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

apps/webapp/app/v3/services/computeTemplateCreation.server.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ export class ComputeTemplateCreationService {
6969

7070
// Required mode
7171
if (options.writer) {
72-
await options.writer.write(
73-
`event: log\ndata: ${JSON.stringify({ message: "Building compute template..." })}\n\n`
74-
);
72+
try {
73+
await options.writer.write(
74+
`event: log\ndata: ${JSON.stringify({ message: "Building compute template..." })}\n\n`
75+
);
76+
} catch {
77+
// Stream may be closed if client disconnected - continue with template creation
78+
}
7579
}
7680

7781
logger.info("Creating compute template (required mode)", {

0 commit comments

Comments
 (0)