pi-web
pi-web copied to clipboard
Standardize API error response shapes
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
}