Skip to content

chore(cli): migrate @fern-api/configuration-loader to use CliError#14993

Draft
FedeZara wants to merge 1 commit intomainfrom
FedeZara/refactor/cli-error-configuration-loader
Draft

chore(cli): migrate @fern-api/configuration-loader to use CliError#14993
FedeZara wants to merge 1 commit intomainfrom
FedeZara/refactor/cli-error-configuration-loader

Conversation

@FedeZara
Copy link
Copy Markdown
Contributor

@FedeZara FedeZara commented Apr 14, 2026

Description

Migrates @fern-api/configuration-loader 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/configuration-loader/src/.

Error codes used

Code Usage
CONFIG_ERROR Invalid generator configuration, missing required fields, unknown generator names
PARSE_ERROR Malformed YAML/JSON configuration files, schema validation failures
VALIDATION_ERROR Invalid color values, docs configuration validation

Files touched (grouped by area)

  • Generators config: generators-yml/loadGeneratorsConfiguration.ts, addGenerator.ts, updateGeneratorGroup.ts, getGeneratorName.ts
  • Schema validation: commons/validateSchema.ts
  • Docs config: docs-yml/convertColorsConfiguration.ts, parseDocsConfiguration.ts
  • Dependencies: dependencies-yml/convertDependenciesConfiguration.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/configuration-loader to use CliError Apr 14, 2026
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-configuration-loader branch 2 times, most recently from 31fd8f2 to 8d3a5d1 Compare April 15, 2026 11:33
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-configuration-loader branch from 8d3a5d1 to 298813b Compare April 15, 2026 11:57
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