Repository navigation
feat(core,errors): AstroidTimeoutError error hierarchy and normalizeTimeoutMs - #347
Merged
Merged
Conversation
… (fix for #341) - Move AstroidTimeoutError to @astroid/errors as a NetworkError subclass with timeoutMs field and compatible dual-form constructor - Add isTimeoutError guard to @astroid/errors - Export AstroidTimeoutError and isTimeoutError from @astroid/errors - Add REQUEST_TIMEOUT code to ApiErrorCode in @astroid/types - Map REQUEST_TIMEOUT code to AstroidTimeoutError in errorClassForCode - Add normalizeTimeoutMs utility to @astroid/core/config - Use normalizeTimeoutMs in resolveConfig and per-request timeout path - Export normalizeTimeoutMs from @astroid/core - Re-export AstroidTimeoutError from @astroid/core/timeout-error for backwards compat - Add timeout-error-hierarchy.test.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AXsLpxHFDNQw6bP5pnmE8L
7 tasks done
6 tasks done
8 tasks
Cjay-Cyber-2
added a commit
that referenced
this pull request
Sep 30, 2026
…e docs (#359) `src/AstroidError.ts` is the compatibility re-export module for the layout documented in #279, but it was not updated when `AstroidTimeoutError` landed in #347. `import { AstroidTimeoutError } from './AstroidError.js'` therefore resolved to `undefined` for consumers using that import path. - Re-export `AstroidTimeoutError` from `AstroidError.ts`, matching `index.ts`. - Add `public-surface.test.ts`, which pins the compatibility module to the entrypoint by identity (not just presence, so `instanceof` cannot silently diverge) and asserts every symbol documented in the README is really exported. Verified to fail without the one-line fix. - Refresh the stale README class list and document the mapping helpers, guards, Stellar mapping and stack-safety options that were missing. Verified: pnpm build, pnpm typecheck, pnpm test (all packages), pnpm lint. @astroid/errors goes from 197 to 247 tests passing. Co-authored-by: Bushra <bushragbadegesin@gmail.com> Co-authored-by: Chijioke Joseph <chijiokejoseph2022@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the core infrastructure changes from #341 (per-request abort/timeout), extracting the parts that don't conflict with already-merged PRs.
Changes
packages/errors/src/classes.ts: AddAstroidTimeoutError extends NetworkErrorwithtimeoutMsfield and dual-form constructorpackages/errors/src/guards.ts: AddisTimeoutErrorguardpackages/errors/src/index.ts: ExportAstroidTimeoutError,isTimeoutError; mapREQUEST_TIMEOUTcode inerrorClassForCodepackages/types/src/common.ts: AddREQUEST_TIMEOUTtoApiErrorCodepackages/core/src/config.ts: AddnormalizeTimeoutMsutility; use it inresolveConfigpackages/core/src/http-client.ts: UsenormalizeTimeoutMsfor per-request timeoutpackages/core/src/index.ts: ExportnormalizeTimeoutMspackages/core/src/timeout-error.ts: Re-exportAstroidTimeoutErrorfrom@astroid/errorsfor backwards compatibilitypackages/client/src/__tests__/timeout-error-hierarchy.test.ts(new): Test suite for error hierarchy🤖 Generated with Claude Code
https://claude.ai/code/session_01AXsLpxHFDNQw6bP5pnmE8L
Generated by Claude Code