Skip to content

Commit a07c681

Browse files
fix(worker): include HTTP status in code host retry warnings (#1576)
* fix(worker): classify GitHub rate limit retries * chore: update changelog for #1576 * fix(worker): simplify retry warning diagnostics
1 parent a51f2e8 commit a07c681

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- Upgraded `@sentry/*` to `^10.70.0`, fixing memory leaks where spans retained request data indefinitely. [#1572](https://github.com/sourcebot-dev/sourcebot/pull/1572)
1818
- Fixed code search result links occasionally getting stuck during navigation and restored Cmd/Ctrl-click to open matches in preview. [#1574](https://github.com/sourcebot-dev/sourcebot/pull/1574)
1919
- Fixed a server-side memory leak where a single shared react-query cache retained state from every server render; the cache is now created per-request. [#1575](https://github.com/sourcebot-dev/sourcebot/pull/1575)
20+
- Fixed code host retry warnings to include the HTTP response status. [#1576](https://github.com/sourcebot-dev/sourcebot/pull/1576)
2021

2122
## [5.1.6] - 2026-08-10
2223

packages/backend/src/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ describe('fetchWithRetry', () => {
317317

318318
expect(logger.warn).toHaveBeenCalledTimes(1);
319319
expect(logger.warn).toHaveBeenCalledWith(
320-
expect.stringContaining('test-identifier')
320+
expect.stringContaining('test-identifier with status 429')
321321
);
322322
});
323323
});

packages/backend/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const fetchWithRetry = async <T>(
9999
})();
100100

101101
const waitTime = Math.max(0, resetDateMs - Date.now());
102-
logger.warn(`Rate limit exceeded for ${identifier}. Waiting ${waitTime}ms before retry ${attempts}/${maxAttempts}...`);
102+
logger.warn(`Request failed for ${identifier} with status ${e.status}. Waiting ${waitTime}ms before retry ${attempts}/${maxAttempts}...`);
103103

104104
await new Promise(resolve => setTimeout(resolve, waitTime));
105105
continue;

0 commit comments

Comments
 (0)