Skip to content

Commit

Permalink
Release v0.4.14
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Mar 15, 2024
1 parent 554df8e commit 3852d7e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# CHANGELOG

## v0.4.14 (2024-03-15)

* [`redirect`]: Return `Req.TooManyRedirectsError` exception.

Previously we _always_ raised a `RuntimeError`. Besides changing the exception struct, now
it is _returned_:

iex> Req.get("https://httpbin.org/redirect/4", max_redirects: 3)
# 07:08:06.868 [debug] redirecting to /relative-redirect/3
# 07:08:06.988 [debug] redirecting to /relative-redirect/2
# 07:08:07.109 [debug] redirecting to /relative-redirect/1
{:error, %Req.TooManyRedirectsError{max_redirects: 3}}

When users where using functions like `Req.get!`, the exception will of course still be
raised.

* Relax `nimble_ownership` version requirement

* [`Req.Test`]: Allow plug stub to be a `module` or `{module, options}`

* [`Req.Test`]: Document stubbing with Broadway

## v0.4.13 (2024-03-07)

* [`run_finch`]: Default to `connect_options: [protocols: [:http1]]` due to regression
Expand Down
3 changes: 2 additions & 1 deletion lib/req/steps.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,8 @@ defmodule Req.Steps do
to `false` to disable logging these messages. Defaults to `:debug`.
* `:max_redirects` - the maximum number of redirects, defaults to `10`. If the
limit is reached, the pipeline is halted and an exception struct is returned.
limit is reached, the pipeline is halted and a `Req.TooManyRedirectsError`
exception is returned.
## Examples
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Req.MixProject do
use Mix.Project

@version "0.4.13"
@version "0.4.14"
@source_url "https://github.com/wojtekmach/req"

def project do
Expand Down

0 comments on commit 3852d7e

Please sign in to comment.