Skip to content

effect@3.14.22

Choose a tag to compare

@github-actions github-actions released this 09 May 13:46
· 5821 commits to main since this release
a15d95c

Patch Changes

  • #4847 24a9ebb Thanks @gcanti! - Schema: TaggedError no longer crashes when the message field is explicitly defined.

    If you define a message field in your schema, TaggedError will no longer add its own message getter. This avoids a stack overflow caused by infinite recursion.

    Before

    import { Schema } from "effect"
    
    class Todo extends Schema.TaggedError<Todo>()("Todo", {
      message: Schema.optional(Schema.String)
    }) {}
    
    // ❌ Throws "Maximum call stack size exceeded"
    console.log(Todo.make({}))

    After

    // ✅ Works correctly
    console.log(Todo.make({}))