Skip to content

Show the HTTP status in the REST engine's gave-up warning - #1505

Merged
helpcodeai merged 2 commits into
mainfrom
fix/gave-up-log-status
Nov 4, 2026
Merged

helpcodeai merged 2 commits into
mainfrom
fix/gave-up-log-status

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

The REST engine's warning "Gave up after N attempts on a transient upstream failure: " printed error.code first. axios also sets a code on HTTP errors (ERR_BAD_REQUEST for every 4xx), so a rate limit was logged as ERR_BAD_REQUEST instead of 429. Cloud logged 85 such lines on 3-4 Nov (DHL 55), which made rate limits look like bad requests in the log review.

Changes

  • The warning prints the HTTP status when there is a response, and the error code otherwise (ECONNRESET, ETIMEDOUT, …).
  • The spec's rate-limit error now carries ERR_BAD_REQUEST like a real axios error. The existing assertions on "… failure: 429 …" fail without the fix.

Log text only: nothing changes in what the tool returns. Cloud and self-hosted behave the same.

Type

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Performance improvement
  • Other (describe below)

Testing

  • Added/updated unit tests
  • Tested manually (describe steps below)
  • No tests needed (explain why)

In packages/backend:

  • npx jest src/connectors/engines/rest.engine --maxWorkers=4 → 202 passed (log-redaction: 2 of 5 fail without the fix)
  • npx eslint on the changed files → exit 0

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test)
  • This PR has a descriptive title

Related Issues

Found in the 2026-11-04 Cloud log review.

@helpcodeai
helpcodeai enabled auto-merge (squash) November 4, 2026 09:18
@helpcodeai
helpcodeai merged commit 0306944 into main Nov 4, 2026
14 checks passed
@helpcodeai
helpcodeai deleted the fix/gave-up-log-status branch November 4, 2026 10:33
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 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.

1 participant