Skip to content

v0.5.5

Choose a tag to compare

@Hades-Ye Hades-Ye released this 28 Mar 06:25
· 80 commits to main since this release
07d8a21

v0.5.5 - GasFree Error Response Handling

Release date: March 28, 2026

Fixes

  • Settlement crash on null status data: GasFree status API can return {"code": 200, "data": null} when polled immediately after submission. This caused AttributeError in Python / TypeError in TypeScript, failing the settlement even though the on-chain transaction succeeded.
  • Transient HTTP errors crash polling loop: waitForSuccess now catches transient errors (e.g. 500/503) during status polling and retries instead of aborting the settlement.
  • Permanent errors retried until timeout: Polling now aborts after max_errors (default: 3) consecutive failures, preventing silent 120s hangs on permanent errors like invalid traceId or auth failures.
  • Silent null propagation: getAddressInfo, getProviders, and submit previously returned None/null silently when the API responded with null data. They now throw explicit errors.
  • Missing submit id guard: submit now throws if the API returns data without an id field, instead of silently returning None typed as str.

Improvements

  • Consecutive error tracking: Error counter resets after each successful poll, so only truly consecutive errors count toward the max_errors abort threshold.
  • Timeout diagnostics: Timeout error messages now include the number of errors encountered during polling for easier debugging.
  • Type accuracy: GasFreeResponse<T>.data typed as T | null in TypeScript; get_status return type widened to Dict | None in Python to reflect actual API behavior.
  • Null check precision: Uses is None / == null for null checks to avoid false positives on other falsy values.

Breaking Changes

None.

Affected SDKs

  • Python: bankofai-x402==0.5.5
  • TypeScript: @bankofai/x402@0.5.5