life360-python icon indicating copy to clipboard operation
life360-python copied to clipboard

Trapping 502 and 504 Bad Gateway errors

Open ryanbuckner opened this issue 2 years ago • 0 comments

Can you add some error handling so the following 502 and 504 Bad Gateway errors are trapped when the Life360 API has issues?

File "life360.py", line 37, in authenticate
File "life360.py", line 26, in make_request
File "models.py", line 917, in json
Jun 6, 2023 at 06:59:45
Life360 Error [Errno Expecting value] <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
</body>
</html>


Jun 6, 2023 at 07:00:30
Life360 Error [Errno Expecting value] <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>

ryanbuckner avatar Jun 08 '23 14:06 ryanbuckner