Dashboard › opencode › HttpApi JSON error contracts
01a0ab03-ee41-7aae-b5b8-20918b1b873fAlways 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.