Skip to content

Map remaining Bitget error codes (80011-80015)#4290

Merged
squadgazzz merged 1 commit intomainfrom
bitget-complete-error-code-mapping
Mar 24, 2026
Merged

Map remaining Bitget error codes (80011-80015)#4290
squadgazzz merged 1 commit intomainfrom
bitget-complete-error-code-mapping

Conversation

@squadgazzz
Copy link
Contributor

Summary

Follow-up to #4285. The initial error code mapping only covered 80000–80010 but the Bitget API also returns 80011–80015. Unmapped codes fell through to Error::Api causing unnecessary warn-level logs (e.g. api { code: 80012, message: "" }).

New mappings:

  • 80011 (failed to generate calldata) → NotFound
  • 80012 (quote failed, no quote available) → NotFound
  • 80013 (unsupported chain) → BadRequest
  • 80014 (order not found) → NotFound
  • 80015 (order already submitted) → left as Api (shouldn't occur in our flow)

Ref: https://web3.bitget.com/en/docs/swap-order#error-code-list

Test plan

  • All 5 bitget tests pass

The initial mapping only covered codes 80000-80010. The Bitget API also
returns codes 80011-80015 which were falling through to the generic Api
error and producing noisy warn logs.

Added mappings:
- 80011 (failed to generate calldata) → NotFound
- 80012 (quote failed) → NotFound
- 80013 (unsupported chain) → BadRequest
- 80014 (order not found) → NotFound
- 80015 (order already submitted) falls through to Api (shouldn't occur)
@squadgazzz squadgazzz marked this pull request as ready for review March 24, 2026 13:56
@squadgazzz squadgazzz requested a review from a team as a code owner March 24, 2026 13:56
@squadgazzz squadgazzz added the hotfix Labels PRs that should be applied into production right away label Mar 24, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

No critical issues found.

@squadgazzz squadgazzz added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 2ed3e04 Mar 24, 2026
19 checks passed
@squadgazzz squadgazzz deleted the bitget-complete-error-code-mapping branch March 24, 2026 14:10
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

hotfix Labels PRs that should be applied into production right away

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants