Reports Effect.try and Effect.tryPromise calls without a catch handler, whose failures surface as a generic unknown error
| Property | Value |
|---|---|
| Category | Anti-pattern |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377169 |
| Language Service name | effectTryWithoutCatch |
| Oxlint name | effecttsgo/effect-try-without-catch |
import { Effect } from "effect"
declare const text: string
export const parsed = Effect.try(() => JSON.parse(text))
/**
^^^^^^^^^^ effecttsgo(effect-try-without-catch): Effect.try is called without a `catch` handler, so failures surface as the generic `UnknownError`. The object form `{ try, catch }` maps the cause to a typed, domain-specific error.
*/See the Language Service setup guide for installation instructions.
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/effect-try-without-catch": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "effectTryWithoutCatch": "warning" } } ] } }