Skip to content

Commit 72b11ff

Browse files
d-csclaude
andcommitted
chore(webapp): downgrade SVE logs in api.v1.deployments.background-workers to warn
Same wrapper-bypass pattern as the projects-scoped sibling; both feed TRIGGER-CLOUD-2S. Type-discriminate before the log; warn for SVE and CreateDeclarativeScheduleError, error for unknown. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bcad519 commit 72b11ff

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

apps/webapp/app/routes/api.v1.deployments.$deploymentId.background-workers.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,20 @@ export async function action({ request, params }: ActionFunctionArgs) {
6060
{ status: 200 }
6161
);
6262
} catch (e) {
63-
logger.error("Failed to create background worker", { error: e });
64-
63+
// Customer-facing validation failures (invalid task config, customer cron
64+
// expression, etc.). The handler returns 4xx with the message; system
65+
// handles it gracefully, no alert needed.
6566
if (e instanceof ServiceValidationError) {
67+
logger.warn("Failed to create background worker", { error: e.message });
6668
return json({ error: e.message }, { status: e.status ?? 400 });
67-
} else if (e instanceof CreateDeclarativeScheduleError) {
69+
}
70+
if (e instanceof CreateDeclarativeScheduleError) {
71+
logger.warn("Failed to create background worker", { error: e.message });
6872
return json({ error: e.message }, { status: 400 });
6973
}
7074

75+
logger.error("Failed to create background worker", { error: e });
76+
7177
return json({ error: "Failed to create background worker" }, { status: 500 });
7278
}
7379
}

0 commit comments

Comments
 (0)