Hyperlinkv0.8.0-beta.28

Config

Config.ConfigErrorclasseffect/Config.ts:70
ConfigError

Represents the error type produced when config loading or validation fails.

When to use

Use when you need to inspect config loading or validation failures.

Details

Wraps either:

  • A SourceError — the provider could not read data (I/O failure).
  • A SchemaError — the data was found but did not match the schema (wrong type, out of range, missing key, etc.).
Source effect/Config.ts:7014 lines
export class ConfigError {
  readonly _tag = "ConfigError"
  readonly name: string = "ConfigError"
  readonly cause: SourceError | Schema.SchemaError
  constructor(cause: SourceError | Schema.SchemaError) {
    this.cause = cause
  }
  get message() {
    return this.cause.toString()
  }
  toString() {
    return `ConfigError(${this.message})`
  }
}
Referenced by 14 symbols