# HG changeset patch # User Aurélien Campéas # Date 1694787426 -7200 # Fri Sep 15 16:17:06 2023 +0200 # Node ID ffd835f0bc0e61a11bf8c4577a5de25c9e3f9ff2 # Parent ff514a126c8f3a63ffecb612d93aff4c1b825830 http/client: handle 403 as unauthorized diff --git a/tshistory/http/client.py b/tshistory/http/client.py --- a/tshistory/http/client.py +++ b/tshistory/http/client.py @@ -53,7 +53,7 @@ raise Exception('404 - please check your base uri') if res.status_code == 400: raise Exception(f'Bad Query: {res.text}') - if res.status_code == 401: + if res.status_code in (401, 403): raise Exception('401 - Unauthorized. Check your tshistory.cfg file') if res.status_code >= 500: raise Exception('The server could not process your query.')