Skip to content

Commit c7ca659

Browse files
d-csclaude
andcommitted
chore(webapp): downgrade SVE schedule-sync log in createDeploymentBackgroundWorkerV4 to warn
Mirrors the createBackgroundWorker fix; same wrap-into-SVE shape, same split: warn + rethrow for SVE, error + wrap-and-throw for unknown. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6176ea7 commit c7ca659

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,26 @@ export class CreateDeploymentBackgroundWorkerServiceV4 extends BaseService {
139139
);
140140

141141
if (schedulesError) {
142+
if (schedulesError instanceof ServiceValidationError) {
143+
// Customer schedule config (typically invalid cron). Surface to
144+
// client via the rethrow; system returns gracefully.
145+
logger.warn("Error syncing declarative schedules", {
146+
error: schedulesError.message,
147+
});
148+
149+
await this.#failBackgroundWorkerDeployment(deployment, schedulesError);
150+
throw schedulesError;
151+
}
152+
153+
// Wrapping the underlying error into a ServiceValidationError below
154+
// would otherwise hide it once the SDK-level filter drops SVEs; log at
155+
// error so the underlying cause stays visible. Mirrors the
156+
// waitpointCompletionPacket.server.ts pattern from dac9c83bd.
142157
logger.error("Error syncing declarative schedules", {
143158
error: schedulesError,
144159
});
145160

146-
const serviceError =
147-
schedulesError instanceof ServiceValidationError
148-
? schedulesError
149-
: new ServiceValidationError("Error syncing declarative schedules");
161+
const serviceError = new ServiceValidationError("Error syncing declarative schedules");
150162

151163
await this.#failBackgroundWorkerDeployment(deployment, serviceError);
152164

0 commit comments

Comments
 (0)