Reading a Connect error code
Two conventions coexist in error bodies, and you need to know that before writing aswitch:
Some refusals carry no
code at all: target refusals only carry
{"message": "Forbidden"} or {"message": "Unauthorized"}. That is deliberate: they must
reveal nothing about other people’s accounts.
Target refusals (401 / 403)
Four causes, only two responses.The first three are byte-identical: the API will never tell you whether an
acct_ exists.
Otherwise it would become a way to enumerate other marketplaces’ accounts.Validation refusals (400 / 422)
Insufficient funds (402)
Both bodies carry
required, seller_available, shortfall, currency. The refund refusal
also carries available and marketplace_balance.
402 and not 422: the request is well formed, it is the funds that are missing.Idempotence conflicts (409)
Rate limiting (429)
E_TOO_MANY_REQUESTS on POST /v1/connect/accounts: 20 requests per minute. No other
Connect route is rate limited.
Unavailability (502 / 503)
Surface (400)
The
Yabetoo-Account header is reserved and is consumed by no Connect route today. Do not
send it.