catchUnfailableEffect

August 4, 2026 ยท View on GitHub

Warns when using error handling on Effects that never fail

PropertyValue
CategoryAnti-pattern
Default severitysuggestion
FixableNo
Effect versionsv3, v4
Diagnostic codesTS377009
Language Service namecatchUnfailableEffect
Oxlint nameeffecttsgo/catch-unfailable-effect

Preview

import { Effect } from "effect"

export const preview = Effect.succeed(1).pipe(
  Effect.catch(() => Effect.succeed(0))
/**
  ^^^^^^^^^^^^ effecttsgo(catch-unfailable-effect): The previous Effect does not fail, so this error-handling branch will never run.
*/
)

Language Service Configuration

See the Language Service setup guide for installation instructions.

{
  "$schema": "./node_modules/@effect/tsgo/schema.json",
  "compilerOptions": {
    "plugins": [
      {
        "name": "@effect/language-service",
        "diagnosticSeverity": {
          "catchUnfailableEffect": "warning"
        }
      }
    ]
  }
}

Oxlint Configuration

See the Oxlint setup guide for installation and patching instructions.

{
  "$schema": "./node_modules/@effect/tsgo/oxlint-schema.json",
  "options": {
    "typeAware": true
  },
  "plugins": ["effecttsgo"],
  "rules": {
    "effecttsgo/catch-unfailable-effect": "warn"
  }
}