Skip to content

fix: harden Retry-After parsing, fix and audit all docs#1944

Merged
ryanio merged 1 commit intomainfrom
fix/retry-after-and-docs-audit
Mar 18, 2026
Merged

fix: harden Retry-After parsing, fix and audit all docs#1944
ryanio merged 1 commit intomainfrom
fix/retry-after-and-docs-audit

Conversation

@ryanio
Copy link
Collaborator

@ryanio ryanio commented Mar 18, 2026

Summary

  • Fix Retry-After parsing bug: Malformed values like "5s" and "1.5" previously bypassed the integer check and fell through to Date.parse(), which could return nonsensical retry delays (e.g. 300s). Now all numeric-looking strings are caught early and only pure integers are accepted.
  • Fix event listener documentation: Corrected payload structures for TransactionDenied, TransactionFailed, MatchOrders, and CancelOrder to match actual dispatch() calls in source. Added missing ApproveOrder, Transfer, and ApproveAllAssets events.
  • Replace deprecated API usage in docs: Swapped getOrder()/getOrders() examples for current getAllOffers, getAllListings, getNFTOffers, getNFTListings endpoints.
  • Document new API methods: Added postListing and postOffer to api-reference.md.
  • Mark deprecated methods: Added deprecation notices to getOrder, getOrders, and postOrder in api-reference.md.

Incorporates work from PRs #1942 and #1941 with fixes.

Test plan

  • All 645 tests passing (644 existing + 2 new, 1 previously failing now fixed)
  • Lint and prettier pass
  • Verify Retry-After returns undefined for "5s" and "1.5"
  • Verify valid integer Retry-After values still work (e.g. "5" → 5)
  • Verify HTTP-date Retry-After still works for non-numeric strings

🤖 Generated with Claude Code

Co-Authored-By: farquadars farquadars@users.noreply.github.com
Co-Authored-By: jeffbrownn jeffbrownn@users.noreply.github.com

- Fix Retry-After parsing to reject malformed values like "5s" and "1.5"
  that previously fell through to date parsing and returned incorrect delays
- Fix event listener examples: correct payloads for TransactionDenied,
  TransactionFailed, CancelOrder; add missing ApproveOrder, Transfer,
  ApproveAllAssets events
- Replace deprecated getOrder/getOrders usage in docs with current
  collection-based and NFT-specific endpoints
- Add postListing/postOffer documentation to api-reference
- Mark deprecated methods (getOrder, getOrders, postOrder) in api-reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryanio ryanio force-pushed the fix/retry-after-and-docs-audit branch 2 times, most recently from bd20c95 to 586b3b9 Compare March 18, 2026 18:29
@ryanio ryanio merged commit 486e11e into main Mar 18, 2026
8 checks passed
@ryanio ryanio deleted the fix/retry-after-and-docs-audit branch March 18, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant