Skip to content

DX: Standardize error response format — inconsistent across endpoints #399

@OneStepAt4time

Description

@OneStepAt4time

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)

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions