@ 261105.1 · fetching

260419.1 · d053f9e77616f178f8dc805c6616cf2d4f6e4357

feat(events): add Unwrap() to EventError

Expose the underlying error payload so callers can use errors.Is / errors.As to match against sentinel values such as io.EOF.

Assisted-by: Claude:claude-opus-4-7

reading declarations

Changes to errors.go. All files

errors.go

@@ -50,6 +50,13 @@ func (ev *EventError) Error() string { 	return ev.err.Error() } +// Unwrap exposes the underlying error payload so callers can use+// errors.Is / errors.As to match against sentinel values such as+// io.EOF.+func (ev *EventError) Unwrap() error {+	return ev.err+}+ // NewEventError creates an ErrorEvent with the given error payload. func NewEventError(err error) *EventError { 	ev := &EventError{err: err}