Package: effect
Module: ConfigProvider
Typed error indicating that a configuration source could not be read.
When to use
Use when you need to report that a custom provider’s underlying store is unreachable or produced an I/O error while reading configuration data.
Gotchas
Do not use SourceError for “key not found”. That case is represented by
returning undefined from load.
Example (Failing with a SourceError)
import { ConfigProvider, Effect } from "effect"
const provider = ConfigProvider.make((_path) =>
Effect.fail(
new ConfigProvider.SourceError({ message: "connection refused" })
)
)
See
ConfigProvider – the interface whose load may fail with this
errorSignature
declare class SourceError
Since v4.0.0