pi-web icon indicating copy to clipboard operation
pi-web copied to clipboard

Standardize API error response shapes

Open Atopos-jy opened this issue 4 months ago • 0 comments

Problem

API routes currently return several different error shapes, such as:

  • { error: string }
  • { success: false, message: string }
  • framework/default error responses

This makes frontend error handling inconsistent and can hide useful details from users.

Proposal

Define and document one shared error response shape for API routes, for example:

{
  success: false,
  message: string,
  code?: string
}

Atopos-jy avatar Jul 29 '26 08:07 Atopos-jy