Skip to content

miniproto.invoke.is_retryable_request

is_retryable_request(raw_request: object, override: bool | None = None) -> bool

Determine whether retrying this request is protocol-safe.

override takes precedence. Otherwise the innermost wrapped request is safe only for known read prefixes or Telegram writes de-duplicated by random_id.

Parameters:

  • raw_request (object) – Request, possibly wrapped in invocation envelopes.
  • override (bool | None) – Explicit retry policy; None applies the built-in allowlist.

Returns:

  • bool – Whether transport or timeout retry code may repeat the request.