Skip to content

Commit 6176ea7

Browse files
d-csclaude
andcommitted
chore(webapp): downgrade SVE schedule-sync log in createBackgroundWorker to warn
Customer schedule-config failures (typically invalid cron) get rethrown to the route handler as ServiceValidationError; that's a 4xx, not a system bug. Split the SVE branch out and log at warn before rethrowing. Non-SVE failures still log at error before being wrapped, mirroring dac9c83's waitpointCompletionPacket.server.ts pattern so visibility survives the SDK-level SVE filter. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a8e76a9 commit 6176ea7

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

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

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,27 @@ export class CreateBackgroundWorkerService extends BaseService {
146146
);
147147

148148
if (schedulesError) {
149+
if (schedulesError instanceof ServiceValidationError) {
150+
// Customer schedule config (typically invalid cron). Surface to
151+
// client via the rethrow; system returns gracefully.
152+
logger.warn("Error syncing declarative schedules", {
153+
error: schedulesError.message,
154+
backgroundWorker,
155+
environment,
156+
});
157+
throw schedulesError;
158+
}
159+
160+
// Wrapping the underlying error into a ServiceValidationError below
161+
// would otherwise hide it once the SDK-level filter drops SVEs; log at
162+
// error so the underlying cause stays visible. Mirrors the
163+
// waitpointCompletionPacket.server.ts pattern from dac9c83bd.
149164
logger.error("Error syncing declarative schedules", {
150165
error: schedulesError,
151166
backgroundWorker,
152167
environment,
153168
});
154169

155-
if (schedulesError instanceof ServiceValidationError) {
156-
throw schedulesError;
157-
}
158-
159170
throw new ServiceValidationError("Error syncing declarative schedules");
160171
}
161172

0 commit comments

Comments
 (0)