Problem
Error responses vary across endpoints — no standard envelope, no error codes, no request IDs.
Current state:
{ error: 'Session not found' }
{ error: 'Invalid request body', details: [...] }
{ error: 'Playwright is not installed', message: 'Install...' }
- approve/reject return 200 even when nothing to approve
Suggested Fix
Define standard error envelope:
interface APIError {
code: string; // 'SESSION_NOT_FOUND', 'VALIDATION_ERROR'
message: string; // Human-readable
details?: unknown; // Zod issues, etc.
requestId?: string;
}
Source
DX audit swarm (2026-03-28)
Problem
Error responses vary across endpoints — no standard envelope, no error codes, no request IDs.
Current state:
{ error: 'Session not found' }{ error: 'Invalid request body', details: [...] }{ error: 'Playwright is not installed', message: 'Install...' }Suggested Fix
Define standard error envelope:
Source
DX audit swarm (2026-03-28)