Skip to content

[TRIVIAL] handle input value too low error - #4962

Merged
MartinquaXD merged 2 commits into
mainfrom
okx-handle-input-value-too-low
Sep 23, 2026
Merged

MartinquaXD merged 2 commits into
mainfrom
okx-handle-input-value-too-low

Conversation

@MartinquaXD

Copy link
Copy Markdown
Contributor

Description

OKX returns error code 51006 for tiny orders or where the API can't figure out the price for the given token.
This recently created alert noise for orders selling the ICP token.

Changes

explicitly handle error code 51006

@MartinquaXD
MartinquaXD requested a review from a team as a code owner September 23, 2026 09:41
@claude

claude Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Claude finished @MartinquaXD's task in 29s —— View job


PR Review

  • Read PR diff and surrounding code
  • Verify error-code mapping and downstream handling
  • Post review

Verdict: LGTM ✅

The change adds OKX error code 51006 ("Input value is too low") to the set mapped to Error::NotFound in handle_api_error. This is the correct classification — okx::Error::NotFound is treated as a benign "no swap available" outcome (crates/solvers/src/infra/dex/mod.rs:104), same as the existing 51005/82000/82104/82112 codes, so it will suppress the alert noise described in the PR rather than surfacing as an API error.

Consistent with existing style (documented inline comment, groups with the other not-found codes). No issues found.

Minor (non-blocking) nit not worth a change: 51006 sits after the 82xxx codes rather than next to its sibling 51005, but the list isn't strictly numerically ordered anyway.
· okx-handle-input-value-too-low

@MartinquaXD
MartinquaXD added this pull request to the merge queue Sep 23, 2026
Merged via the queue into main with commit 66a69fc Sep 23, 2026
24 checks passed
@MartinquaXD
MartinquaXD deleted the okx-handle-input-value-too-low branch September 23, 2026 10:14
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants