Map a non-2xx response to its code, message and details.
code
ApiErrorCode
error
body.code
message
body.error
: <body.message>
http_<status>
body.message
HTTP <status> <statusText>
details
body.details
HTTP status.
HTTP status text.
Raw response body.
The mapped error parts.
Map a non-2xx response to its code, message and details.
codeis anApiErrorCode,erroris a string):codeisbody.code;messageisbody.error, plus: <body.message>when present.codeisbody.code, elsebody.error, elsehttp_<status>;messageisbody.message, elsebody.error, elseHTTP <status> <statusText>.details:body.detailswhen present, else the parsed body (or raw text).