Skip to content

fix(api): keep status and error body on API errors; explain missing buybox #38 - #50

Merged
yashiels merged 1 commit into
mainfrom
agent/errors-info
Sep 26, 2026
Merged

yashiels merged 1 commit into
mainfrom
agent/errors-info

Conversation

@yashiels

Copy link
Copy Markdown
Owner
  • ApiError carries status, method, path (pathname only). The --json error envelope adds details, an allowlist of message/code/error + errors[] {field,message,code}, redacted then truncated, with emails and 9+ digit runs masked. --verbose logs METHOD path -> status.
  • Typed cart/card/order calls (authedJson) now throw ApiError through the same path, so a failed cart add shows the server message ("Product in cart is not available anymore.") instead of HTTP 400 [object Object].
  • info / skuForPlid: missing buybox retries once (authed when logged in); still missing -> null price/sku + unavailableReason, never R— / sku ?. Missing buybox exits 1, variants still exit 4.

363 tests. Live: invalid cart add and wishlist write show status/method/path/details; info returns price+sku. Oracle signed off (3 rounds).

Closes #38
Closes #39

@yashiels
yashiels merged commit a50e2a7 into main Sep 26, 2026
1 check passed
@yashiels
yashiels deleted the agent/errors-info branch September 26, 2026 23:41

@sentinel-skyner sentinel-skyner Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Sentinel review

No material correctness or security issues found.

Automated review via cursorbridge:gpt-5.3-codex. Findings only — not an approval. Push new commits to re-review.

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.

info intermittently returns no price/SKU (R—, sku ?) ApiError drops HTTP status and response body (generic 'Oops' only)

1 participant