Skip to content

Commit

Permalink
Do not crash when document response body is empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDryga committed Jun 9, 2024
1 parent dee6893 commit e4d9dca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/openid_connect/document.ex
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ defmodule OpenIDConnect.Document do

{:ok, json, expires_at}
else
{:ok, %Finch.Response{body: response, status: status}} ->
{:error, {status, :erlang.list_to_binary(response)}}
{:ok, %Finch.Response{body: body, status: status}} ->
{:error, {status, IO.iodata_to_binary(body)}}

other ->
other
Expand Down

0 comments on commit e4d9dca

Please sign in to comment.