Skip to content

[BWC] Enhancement - handle 429, 500, 502, 504 err status codes#4116

Open
gabrielbazan7 wants to merge 1 commit intobitpay:masterfrom
gabrielbazan7:ref/error-handling
Open

[BWC] Enhancement - handle 429, 500, 502, 504 err status codes#4116
gabrielbazan7 wants to merge 1 commit intobitpay:masterfrom
gabrielbazan7:ref/error-handling

Conversation

@gabrielbazan7
Copy link
Contributor

@gabrielbazan7 gabrielbazan7 commented Mar 4, 2026

Description

Adds typed errors for status codes that Cloudflare returns as raw HTML (429, 500, 502, 504). Now the client gets a readable message instead of HTML.

Changelog

  • Handle HTTP 429, 500, 502, 504 with typed BwcError in request.ts
  • Add corresponding error specs with user-friendly messages

Checklist

  • I have read CONTRIBUTING.md and verified that this PR follows the guidelines and requirements outlined in it.
  • I have added the appropriate package tag(s) (e.g. BWC if modifying the bitcore-wallet-client package, CLI if modifying the bitcore-cli package, etc.)
  • I have verified that this is not an existing PR (open or closed)

@gabrielbazan7 gabrielbazan7 changed the title BWC: Enhancement - handle 429, 500, 502, 504 err status codes [BWC] Enhancement - handle 429, 500, 502, 504 err status codes Mar 4, 2026
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