Skip to content

chore(cli): migrate @fern-api/lazy-fern-workspace to use CliError#15005

Draft
FedeZara wants to merge 1 commit intomainfrom
FedeZara/refactor/cli-error-lazy-fern-workspace
Draft

chore(cli): migrate @fern-api/lazy-fern-workspace to use CliError#15005
FedeZara wants to merge 1 commit intomainfrom
FedeZara/refactor/cli-error-lazy-fern-workspace

Conversation

@FedeZara
Copy link
Copy Markdown
Contributor

@FedeZara FedeZara commented Apr 14, 2026

Description

Migrates @fern-api/lazy-fern-workspace to use explicit CliError error codes on every failAndThrow / failWithoutThrowing call site.

This is one of the package migration PRs that follow the error classification system introduced in #14749.

Changes Made

Assigned typed error codes across call sites in packages/cli/workspace/lazy-fern-workspace/src/. Also added missing CliError imports to all files that reference CliError.Code.

Error codes used

Code Usage
CONFIG_ERROR Missing workspace configuration, invalid workspace structure
PARSE_ERROR Failed OpenAPI/AsyncAPI parsing, overlay application failures
RESOLUTION_ERROR Protobuf resolution failures, dependency loading errors
NETWORK_ERROR Failed dependency downloads

Files touched (grouped by area)

  • Workspace loading: LazyFernWorkspace.ts, utils/loadDependency.ts
  • Loaders: loaders/applyOverlays.ts, loaders/mergeWithOverrides.ts
  • Protobuf: protobuf/ProtobufIRGenerator.ts, protobuf/ProtobufOpenAPIGenerator.ts

Testing

  • Existing tests pass (pnpm test, excluding e2e and pre-existing environment failures)

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@FedeZara FedeZara changed the title refactor(cli): rename FernCliError to TaskAbortSignal chore(cli): migrate @fern-api/lazy-fern-workspace to use CliError Apr 14, 2026
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-lazy-fern-workspace branch from 538a2ec to d144ccb Compare April 14, 2026 22:41
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-lazy-fern-workspace branch from d144ccb to 27257dc Compare April 14, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant