MCPcopy Create free account
hub / github.com/effect-app/libs / isMissingDataOnly

Function isMissingDataOnly

repos/effect/packages/effect/src/Config.ts:298–325  ·  view source on GitHub ↗
(issue: SchemaIssue.Issue)

Source from the content-addressed store, hash-verified

296 ? f(resolution.value).pipe(
297 Effect.mapEager((value) => resolved(value, resolution.hasInput)),
298 Effect.mapErrorEager((error) => evaluationFailure(error, resolution.hasInput))
299 )
300 : Effect.succeed(resolution))
301 )
302})
303
304/**
305 * Provides a fallback config when parsing fails with a `ConfigError`.
306 *
307 * **When to use**
308 *
309 * Use when you need to try an alternative config source after the primary one
310 * fails.
311 *
312 * **Details**
313 *
314 * Unlike {@link withDefault}, this handles both semantic absence and **all**
315 * `ConfigError`s. The fallback function receives the error and returns a new
316 * `Config`.
317 *
318 * **Gotchas**
319 *
320 * Recovery preserves whether the primary config read provider input. When the
321 * recovered config is composed with {@link all}, invalid input in the primary
322 * branch still makes the enclosing group partially supplied, so an outer
323 * {@link withDefault} or {@link option} does not replace the whole group.
324 *
325 * **Example** (Falling back to a literal)
326 *
327 * ```ts import.meta.vitest
328 * import { Config, ConfigProvider, Effect } from "effect"

Callers 1

Config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…