.json()s every response never breaks on an error.
Branch on the stable
error code, never on the human-readable message (which may
be reworded at any time). asset is present only on asset-scoped errors.Status codes
The HTTP status tells you the class; theerror code tells you the specifics.
Error codes
Debugging with x-request-id
Every response (success or error) carries an x-request-id header. When something
looks wrong, grab it and include it in your report — it lets us trace the exact request.
x-request-id header, we echo it back so the id survives across your
own hops.