Skip to content

Errors

Internal translation and guarded boundary helpers; no retry execution.

Origin codes are accepted only from exact, imported SDK classes whose declared and instance codes match the reviewed catalog. Upstream text and diagnostics are never copied. The catalog below specifies supported codes and display categories. Only overload and request timeout can advertise recovery with explicit opt-in; rate-limit codes also represent legacy quota failures and are conservatively excluded. Cache operations never advertise retries. Delay hints are integer seconds in the range 0 through 86400, retained only when retrying is permitted. Applications own retry budgets, correlation records, and public API error envelopes.

translate_misc_error(error, *, operation, error_class=MiscRuntimeError, allow_retry=False)

Return a vetted misc error, falling back safely if translation itself fails.

Parameters:

Name Type Description Default
error Exception

Original failure; its text is never inspected.

required
operation str

Identifier from the operation catalog; unknown values are omitted.

required
error_class type[BaseMiscError]

Classification for unknown failures. Defaults to MiscRuntimeError.

MiscRuntimeError
allow_retry bool

Opt into limited recovery metadata, never execution. Defaults to False.

False

Returns:

Name Type Description
BaseMiscError BaseMiscError

Safe normalized failure, retaining a trustworthy code and reference ID when available.