You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
effect: classify AiError.InvalidResponseError as malformed-response #376
effect 4.0.6 adds a non-retryable AiError.InvalidResponseError reason for provider response-schema and SSE decoding failures. Its release notes ask exhaustive AiErrorReason matches to handle the new tag.
classifyReason in packages/effect/src/errors.ts is not exhaustive. An AiError with this reason (only another effect/ai provider can produce one, because this bridge never does) falls through to the HTTP-status check:
With a 5xx HTTP context, classifyError returns "provider-unavailable" and isTransient returns true, but effect marks the reason non-retryable.
With no status, it returns "unknown".
Proposed fix: add case "InvalidResponseError": to the "malformed-response" group next to InvalidOutputError/StructuredOutputError, with a unit test in packages/effect/test/errors.test.ts.
Found while bumping effect to 4.0.6 in the daily dependency batch (branch deps-batch-oct23). Recheck trigger: before the effect 0.1.0 release (#325) merges.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Activity