diff --git a/monarchmoney/monarchmoney.py b/monarchmoney/monarchmoney.py index 4ec4a5c..58c4216 100644 --- a/monarchmoney/monarchmoney.py +++ b/monarchmoney/monarchmoney.py @@ -2886,6 +2886,7 @@ async def _multi_factor_authenticate( ) as resp: if resp.status != 200: try: + raw_response = await resp.text() response = await resp.json() if "detail" in response: error_message = response["detail"] @@ -2897,7 +2898,7 @@ async def _multi_factor_authenticate( raise LoginFailedException(error_message) except: raise LoginFailedException( - f"HTTP Code {resp.status}: {resp.reason}\nRaw response: {resp.text}" + f"HTTP Code {resp.status}: {resp.reason}\nRaw response: {raw_response}" ) response = await resp.json() self.set_token(response["token"])