Skip to content

Commit ddd043a

Browse files
d-csclaude
andcommitted
chore(webapp): downgrade SVE/OOE logs in api.v1.tasks.batch to warn
Closes the wrapper-bypass gap on TRIGGER-CLOUD-38 (Batch trigger error, 755 events in 48h). Customer-facing 422 paths now log at warn; only the 500 fall-through escalates to Sentry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 72b11ff commit ddd043a

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

apps/webapp/app/routes/api.v1.tasks.batch.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,26 @@ const { action, loader } = createActionApiRoute(
127127

128128
return json(batch, { status: 202, headers: $responseHeaders });
129129
} catch (error) {
130+
// Customer-facing validation/quota failures (invalid batch shape,
131+
// entitlements exhausted). The handler returns 422 with the message;
132+
// system handles it gracefully, no alert needed.
133+
if (error instanceof ServiceValidationError) {
134+
logger.warn("Batch trigger error", { error: error.message });
135+
return json({ error: error.message }, { status: 422 });
136+
}
137+
if (error instanceof OutOfEntitlementError) {
138+
logger.warn("Batch trigger error", { error: error.message });
139+
return json({ error: error.message }, { status: 422 });
140+
}
141+
130142
logger.error("Batch trigger error", {
131143
error: {
132144
message: (error as Error).message,
133145
stack: (error as Error).stack,
134146
},
135147
});
136148

137-
if (error instanceof ServiceValidationError) {
138-
return json({ error: error.message }, { status: 422 });
139-
} else if (error instanceof OutOfEntitlementError) {
140-
return json({ error: error.message }, { status: 422 });
141-
} else if (error instanceof Error) {
149+
if (error instanceof Error) {
142150
return json(
143151
{ error: "Something went wrong" },
144152
{ status: 500, headers: { "x-should-retry": "false" } }

0 commit comments

Comments
 (0)