Skip to content

Commit 82ac928

Browse files
d-csclaude
andcommitted
chore(webapp): downgrade SVE/OOE logs in api.v2.tasks.batch to warn
Same wrapper-bypass shape as the v1 sibling. 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 ddd043a commit 82ac928

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,26 @@ const { action, loader } = createActionApiRoute(
144144
headers: $responseHeaders,
145145
});
146146
} catch (error) {
147+
// Customer-facing validation/quota failures (invalid batch shape,
148+
// entitlements exhausted). The handler returns 422 with the message;
149+
// system handles it gracefully, no alert needed.
150+
if (error instanceof ServiceValidationError) {
151+
logger.warn("Batch trigger error", { error: error.message });
152+
return json({ error: error.message }, { status: 422 });
153+
}
154+
if (error instanceof OutOfEntitlementError) {
155+
logger.warn("Batch trigger error", { error: error.message });
156+
return json({ error: error.message }, { status: 422 });
157+
}
158+
147159
logger.error("Batch trigger error", {
148160
error: {
149161
message: (error as Error).message,
150162
stack: (error as Error).stack,
151163
},
152164
});
153165

154-
if (error instanceof ServiceValidationError) {
155-
return json({ error: error.message }, { status: 422 });
156-
} else if (error instanceof OutOfEntitlementError) {
157-
return json({ error: error.message }, { status: 422 });
158-
} else if (error instanceof Error) {
166+
if (error instanceof Error) {
159167
return json(
160168
{ error: error.message },
161169
{ status: 500, headers: { "x-should-retry": "false" } }

0 commit comments

Comments
 (0)