What's broken
Tesla.Adapter.Finch.stream/3 in tesla 1.15.3 only pattern-matches {:ok, _acc} and {:error, error} from Finch.stream/5. Finch can also return {:error, error, partial_acc} (a 3-tuple) when a transport error happens mid-stream. The Tesla streaming Task raises CaseClauseError, the linked Oban worker receives an EXIT signal, and the AI Assistant message-processing job dies abruptly.
How it surfaced
Apollo's SSE connection to Lightning dropped mid-stream on staging, partway through content_block_delta events. Logs show:
** (CaseClauseError) no case clause matching: {:error, %Finch.TransportError{reason: :closed, source: %Mint.TransportError{reason: :closed}}, {#Reference<...>, {:data, "event: content_block_delta\n..."}}}
(tesla 1.15.3) lib/tesla/adapter/finch.ex:120: anonymous fn/6 in Tesla.Adapter.Finch.stream/3
This is the trigger for the broader incident tracked in #4780. The companion fix on our side (#4780) makes recovery work gracefully even when the underlying call crashes, but the crash itself is unnecessary once Tesla is upgraded.
What to fix
Upstream Tesla shipped the relevant fixes in 1.16.0 (released 2026-01-01):
Latest stable is 1.18.2 (2026-05-15). Bumping mix.exs from "~> 1.15.3" to "~> 1.18" should pick up the fix. A quick audit of our Tesla usage (Lightning.ApolloClient plus anywhere else we instantiate a Tesla.Client) is needed to confirm no behaviour changes affect us; the 1.16/1.17/1.18 release notes look uneventful for our code paths.
What's broken
Tesla.Adapter.Finch.stream/3in tesla 1.15.3 only pattern-matches{:ok, _acc}and{:error, error}fromFinch.stream/5. Finch can also return{:error, error, partial_acc}(a 3-tuple) when a transport error happens mid-stream. The Tesla streaming Task raisesCaseClauseError, the linked Oban worker receives an EXIT signal, and the AI Assistant message-processing job dies abruptly.How it surfaced
Apollo's SSE connection to Lightning dropped mid-stream on staging, partway through
content_block_deltaevents. Logs show:This is the trigger for the broader incident tracked in #4780. The companion fix on our side (#4780) makes recovery work gracefully even when the underlying call crashes, but the crash itself is unnecessary once Tesla is upgraded.
What to fix
Upstream Tesla shipped the relevant fixes in 1.16.0 (released 2026-01-01):
{:error, error, _}and wraps the streaming Task body inhandle_stream_response/3.Latest stable is 1.18.2 (2026-05-15). Bumping
mix.exsfrom"~> 1.15.3"to"~> 1.18"should pick up the fix. A quick audit of our Tesla usage (Lightning.ApolloClientplus anywhere else we instantiate aTesla.Client) is needed to confirm no behaviour changes affect us; the 1.16/1.17/1.18 release notes look uneventful for our code paths.