Skip to main content

Reading a Connect error code

Two conventions coexist in error bodies, and you need to know that before writing a switch:
Always branch on the literal value of the code field in the response body.
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)

On POST /v1/connect/accounts/{acct}/withdrawals, a replay returns the original 201 for 24 hours, then 409 E_DUPLICATE_OPERATION. The withdrawal did take place in both cases.

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)

Connect fails closed on pricing. A 503 E_CONNECT_PRICING_UNAVAILABLE means the operation was refused rather than charged at zero. That is deliberate: a silently zero commission would be an invisible loss.

Surface (400)

The Yabetoo-Account header is reserved and is consumed by no Connect route today. Do not send it.