Skip to content

Commit 82b874b

Browse files
committed
Improved logging
1 parent 2b8736f commit 82b874b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

resource_catalogue_fastapi/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def workspaces_api_request(headers: dict, workspace: str, user: str) -> requests
3434
workspaces_api_url = (
3535
f"https://{os.getenv('EODH_DOMAIN')}/api/workspaces/{workspace}/users/{user}"
3636
)
37+
logger.debug(f"Sending request to Workspaces API: {workspaces_api_url} with headers: {headers}")
3738
return requests.get(workspaces_api_url, headers=headers)
3839

3940

@@ -75,6 +76,7 @@ def check_policy(
7576
return False
7677

7778
response = workspaces_api_request(request.headers, workspace, username)
79+
logger.debug(f"Workspaces API response: {response.status_code}")
7880
logger.debug(f"Workspaces API response: {response.json()}")
7981
if response.status_code != 200 or response.json().get("username") != username:
8082
return False

0 commit comments

Comments
 (0)