Breaking: one error body
Breaking. Endpoints that answered an error with
{ "success": false, "data": null, "error": "<string>" } now answer with the documented envelope, where error is an object:- Migrate: branch on
error.code(the codes) instead of parsing theerrorstring. The message text of a 4xx is unchanged. - Every error of these endpoints is now the envelope. That includes the ones that had an empty body (a 400 over a batch cap, a 500, a wrong method) or a plain-text body (a query parameter that does not parse, or a
/graphqlrequest body that is not valid JSON). A path outside the API’s routes can still be a 404 with an empty body. - New codes: a missing query parameter is
MISSING_PARAM, and a wrong HTTP method is a 405METHOD_NOT_ALLOWED. - A 5xx message is now generic. It no longer carries the internal cause; retry on
UNAVAILABLE,GATEWAY_TIMEOUTorINTERNAL. - A malformed mint is a 400. On
/tokens/{mint}/holders,/holders/top,/snipers,/insiders,/smart-moneyand/whalesit is a 400INVALID_PARAMon every tier; before, it was an empty 200.

