Skip to main content

Module invoke_support

Module invoke_support 

Source
Expand description

Decoded app invocation results and the canonical invoke error.

Structs§

InvokeResultError
Decoded app invocation payload failure: an HTTP-error status, an error envelope, or an undecodable result body.

Enums§

InvokeError
Failure of a json_result method: the transport failed, or the decoded result carried a payload failure.

Functions§

decode_app_result
Decodes one app operation result with the standard JSON envelope semantics: success envelopes return their data, error envelopes and HTTP-error statuses return InvokeResultError, and any other JSON body passes through unchanged.
decode_graphql_result
Decodes one GraphQL invocation result like decode_app_result and additionally fails when the response carries a non-empty GraphQL errors array.
error_for_status
Returns the payload failure an HTTP-error status (>= 400) decodes to, mirroring reqwest’s Response::error_for_status; any other status returns Ok. The error carries exactly what decode_app_result would attach for the same status and body.
is_success
Reports whether an HTTP status code is a success (200-299), mirroring reqwest’s StatusCode::is_success.