diegosouzapw/OmniRoute · error
SECURITY_001
SECURITY_001
Error message
Request blocked: potential prompt injection detected
What it means
Error "Request blocked: potential prompt injection detected" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/api/v1/responses/route.ts:156
} catch (error) {
console.error("[SECURITY] Injection guard error:", error);
return finishAdmission(
new Response(JSON.stringify({ error: "Security check failed" }), {
status: 500,
headers: { "Content-Type": "application/json" },
})
);
}
const { blocked, result } = guardResult;
if (blocked) {
return finishAdmission(
new Response(
JSON.stringify({
error: {
message: "Request blocked: potential prompt injection detected",
type: "injection_detected",
code: "SECURITY_001",
detections: result.detections.length,
},
}),
{ status: 400, headers: { ...CORS_HEADERS, "Content-Type": "application/json" } }
)
);
}
if (result.flagged) {
try {
request.headers.set("X-Injection-Flagged", "true");
request.headers.set("X-Injection-Detections", String(result.detections.length));
} catch {
// Detection already ran; metadata propagation is best-effort.
}
}
// Codex CLI (wire_api="responses") consumes this endpoint over SSE and its reqwest
// client drops the connection if no bytes arrive within ~5s. Keep the connectionView on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/api/v1/responses/route.ts:156 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/137c1c9b37c16be2.
Report an issue: GitHub.