Marketplace API
A structured envelope with a code you can branch on:
Branch on
error.code, not the message — messages are for humans and may get
reworded.
On a 502 the message is deliberately generic. Upstream error text isn’t passed
through, because it can contain query internals. Retry, and tell us if it
persists.
Store API
A flat string:Handling both
What’s worth retrying
→ Rate limits has a backoff implementation.
Opaque 400s
Store API payload validation is strict but reports generically —"Invalid product payload" rather than naming the field.
