Error format
REST API errors return a JSON body with a singleerror object:
object
message (string, human-readable), type (string, error category), param (string or null, the offending parameter if any), code (string or null, machine-readable cause).type (the stable category) and use code to distinguish causes within it.
Error types
insufficient_quota codes
Realtime errors
The Realtime WebSocket signals problems with anerror server event carrying the same type / code / message / param fields. Billing refusals use type: "insufficient_quota" and are followed by WebSocket close code 4429; invalid or expired keys close with code 3000. See the close-code table for all codes.