DashboardopencodeHttpApi JSON error contracts

HttpApi JSON error contracts

Category: preference
Confidence: 1.00
ID: 01a0ab03-ee41-7aae-b5b8-20918b1b873f
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 1WhcGbpUVESyGRsty
Created: 2026-09-16 16:19:16
Updated: 2026-09-16 16:19:16

Content

Always declare public JSON failures as explicit Schema.ErrorClass endpoint contracts and translate domain/storage errors at the handler boundary. Chose typed API errors over leaking HttpApi types into services or using generic built-ins because SDK-visible message bodies need an exact stable wire shape; HttpApiError.* is allowed only when its empty/tagged body is intentionally the contract.

Move to: