v0.5.5
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 causedAttributeErrorin Python /TypeErrorin TypeScript, failing the settlement even though the on-chain transaction succeeded. - Transient HTTP errors crash polling loop:
waitForSuccessnow 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, andsubmitpreviously returnedNone/nullsilently when the API responded with null data. They now throw explicit errors. - Missing submit id guard:
submitnow throws if the API returns data without anidfield, instead of silently returningNonetyped asstr.
Improvements
- Consecutive error tracking: Error counter resets after each successful poll, so only truly consecutive errors count toward the
max_errorsabort threshold. - Timeout diagnostics: Timeout error messages now include the number of errors encountered during polling for easier debugging.
- Type accuracy:
GasFreeResponse<T>.datatyped asT | nullin TypeScript;get_statusreturn type widened toDict | Nonein Python to reflect actual API behavior. - Null check precision: Uses
is None/== nullfor 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