Module http_client

Source

Re-exports§

pub use super::types::HttpPostRequest;
pub use super::types::HttpRequest;

Structs§

HttpClient

Constants§

STORE_CODE_KINDS
Backend error.codes that name a store refusal, mapped to the store ErrorKind the façades switch on. A status alone cannot say these: a bad receipt and a malformed request are both 400, a product the receipt names and an unknown route are both 404, and a store outage is a 503 like any server fault. Consulted after SUBSCRIBER_UNRESOLVABLE_CODE and before the status table; an unlisted code falls back to the status. RECEIPT_IN_USE (409) is deliberately absent: its status kind, Conflict, is already the right one and the code is the detail.
SUBSCRIBER_UNRESOLVABLE_CODE
The backend error.code for a device whose merge chain is corrupt (packages/shared/src/error-catalog.ts). It gets its own ErrorKind because no status alone says it: it rides a 409 like other refusals.

Functions§

error_from_status
Map an HTTP error status + response body to a RovenueError, preserving the backend {"error":{"code","message"}} envelope when present.