Skip to content

Commit 69e6985

Browse files
chapterjasonclaude
andcommitted
fix(core): attach status 504 to remote store timeout errors
Allows callers to distinguish timeouts from other HTTP errors (400/500). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e8421cc commit 69e6985

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/core/src/store/remote.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export class RemoteStore {
3131
if (err.name === "AbortError") {
3232
const msg = `Request timed out after ${REQUEST_TIMEOUT_MS}ms: ${path}`;
3333
logger.error("remote:timeout", { path, timeoutMs: REQUEST_TIMEOUT_MS });
34-
throw new Error(msg);
34+
const timeoutErr = new Error(msg);
35+
timeoutErr.status = 504;
36+
throw timeoutErr;
3537
}
3638
throw err;
3739
} finally {

0 commit comments

Comments
 (0)