Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/req/steps.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2053,7 +2053,7 @@ defmodule Req.Steps do

* `Req.TransportError` with `reason: :timeout | :econnrefused | :closed`

* `Req.HTTPError` with `protocol: :http2, reason: :unprocessed`
* `Req.HTTPError` with `protocol: :http2, reason: :unprocessed | :disconnected | :read_only`

* `:transient` - same as `:safe_transient` except retries all HTTP methods (POST, DELETE, etc.)

Expand Down Expand Up @@ -2176,6 +2176,16 @@ defmodule Req.Steps do
true
end

# See https://github.com/sneako/finch/issues/144
defp transient?(%Req.HTTPError{protocol: :http2, reason: :disconnected}) do
true
end

# See https://github.com/sneako/finch/issues/216
defp transient?(%Req.HTTPError{protocol: :http2, reason: :read_only}) do
true
end

defp transient?(%{__exception__: true}) do
false
end
Expand Down