Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Class ConfigError

    Error subclass for configuration failures.

    Invalid config file — YAML/JSON parse error or Zod schema validation failure

    Missing config — no praman.config.ts/yml found in project root

    Schema validation — config values out of range or wrong type

    const error = new ConfigError({
    message: 'Invalid auth strategy',
    attempted: 'Validate config',
    validationErrors: [{ path: ['auth'], message: 'Invalid', code: 'invalid_enum_value' }],
    });

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new ConfigError instance.

      Parameters

      • options: ConfigErrorOptions

        Config error construction options including validation errors and config path.

      Returns ConfigError

      import { ConfigError } from '#core/errors/config-error.js';

      const error = new ConfigError({
      message: 'Config file contains invalid values',
      attempted: 'Load config from praman.config.ts',
      configPath: '/app/praman.config.ts',
      validationErrors: [{ path: ['auth'], message: 'Required', code: 'invalid_type' }],
      });

    Properties

    attempted: string
    code: ErrorCode
    configPath: string | undefined
    details: Readonly<Record<string, unknown>>
    retryable: boolean
    severity: "error" | "info" | "warning"
    suggestions: readonly string[]
    timestamp: string
    validationErrors: readonly ValidationIssue[]

    Methods

    • Returns structured context for AI agents with configuration diagnostics.

      Returns AIErrorContext & {
          configPath: string | undefined;
          validationErrors: readonly ValidationIssue[];
      }

      Base AI context plus validationErrors and configPath fields to help diagnose configuration issues and suggest fixes.

      const context = error.toAIContext();
      // context.validationErrors, context.configPath available
      // Send to LLM for config fix suggestions
    • Serializes the error to a JSON-safe object with configuration fields.

      Returns SerializedPramanError & {
          configPath: string | undefined;
          validationErrors: readonly ValidationIssue[];
      }

      Base fields plus validationErrors and configPath.

      const json = error.toJSON();
      // json.configPath === '/app/praman.config.ts'
      // json.validationErrors === [{ path: ['auth'], message: 'Required', code: 'invalid_type' }]
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());