Skip to content

chore(cli): migrate @fern-api/remote-workspace-runner to use CliError#15012

Draft
FedeZara wants to merge 1 commit intomainfrom
FedeZara/refactor/cli-error-remote-workspace-runner
Draft

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

Conversation

@FedeZara
Copy link
Copy Markdown
Contributor

@FedeZara FedeZara commented Apr 14, 2026

Description

Migrates @fern-api/remote-workspace-runner 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/generation/remote-generation/remote-workspace-runner/src/. Also added missing CliError imports to all files that reference CliError.Code.

Error codes used

Code Usage
NETWORK_ERROR HTTP/API call failures, job creation errors, source upload failures
CONFIG_ERROR Invalid generation configuration, missing required fields
CONTAINER_ERROR Remote container execution failures
INTERNAL_ERROR Unexpected job states, polling failures

Files touched (grouped by area)

  • Job management: createAndStartJob.ts, pollJobAndReportStatus.ts
  • Generation: runRemoteGenerationForAPIWorkspace.ts, runRemoteGenerationForDocsWorkspace.ts, runRemoteGenerationForGenerator.ts
  • Publishing: publishDocs.ts
  • Task handling: RemoteTaskHandler.ts, SourceUploader.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/remote-workspace-runner to use CliError Apr 14, 2026
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-remote-workspace-runner branch 3 times, most recently from 4daa650 to 887c69e Compare April 15, 2026 12:02
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-remote-workspace-runner branch from 887c69e to a1f6b4c Compare April 15, 2026 12:28
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