An API error response, produced by Mercadopago.HTTP.unwrap/1.
The SDK's own functions never return this: they report every completed
response as {:ok, %{status: _, response: _}}, errors included. Use it when
you would rather branch on {:ok, _} / {:error, _} than on the status code.
Summary
Functions
Builds an error from a status and a decoded response body.
Types
Functions
@spec new(non_neg_integer(), map() | list() | binary() | nil) :: t()
Builds an error from a status and a decoded response body.
MercadoPago is inconsistent about which key carries the human-readable text,
so message falls back through "message", "error" and finally a generic
string naming the status. The untouched body is always kept in :response.