From 250c4e46e2cdab725c94360ca187acb11d401247 Mon Sep 17 00:00:00 2001 From: Scott Ames-Messinger Date: Thu, 22 Feb 2024 10:01:00 -0500 Subject: [PATCH] fix: Log the error body (#106) --- lib/ueberauth/strategy/google.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ueberauth/strategy/google.ex b/lib/ueberauth/strategy/google.ex index e78e0db..1bad440 100644 --- a/lib/ueberauth/strategy/google.ex +++ b/lib/ueberauth/strategy/google.ex @@ -134,8 +134,8 @@ defmodule Ueberauth.Strategy.Google do resp = Ueberauth.Strategy.Google.OAuth.get(token, get_userinfo_endpoint(conn)) case resp do - {:ok, %OAuth2.Response{status_code: 401, body: _body}} -> - set_errors!(conn, [error("token", "unauthorized")]) + {:ok, %OAuth2.Response{status_code: 401, body: body}} -> + set_errors!(conn, [error("token", "unauthorized" <> body)]) {:ok, %OAuth2.Response{status_code: status_code, body: user}} when status_code in 200..399 ->