TRAITS

yield-effectable-errors-directly

When an Effect error value is itself effectable, return or yield it directly instead of wrapping it with Effect.fail: return error, not return Effect.fail(error). Keep Effect.fail for error values that are not effectable.

Applies when
returning or yielding an Effect error value that is itself effectable.
File types
  • TypeScript
  • TSX
ID
4e1d575c-d906-4941-b654-f683fb63bdc3
Source
.agents/traits/yield-effectable-errors-directly-4e1d575c-d906-4941-b654-f683fb63bdc3.md

Skipping this trait

Add this comment before any code to skip the trait for a whole file. A reason is required.

File header
// traits-ignore-file 4e1d575c-d906-4941-b654-f683fb63bdc3: <reason>