added extra logs #50

Merged
ameye merged 1 commits from test into master 2025-10-27 17:26:41 +00:00
+4 -1
View File
@@ -15,11 +15,14 @@ def get_headers():
"username": BANK_CALL_BASIC_AUTH_USERNAME,
"password": BANK_CALL_BASIC_AUTH_PASSWORD,
}
logger.info(f"Calling Bank Call Auth endpoint: {url}")
logger.info(f"Calling Bank Call Auth endpoint with data: {data}")
try:
response = requests.post(url, data=data, timeout=10)
response.raise_for_status() # Raises HTTPError for 4xx/5xx
result = response.json()
logger.info(f"Bank Call Auth Response: {result}")
# Check if access_token is present
@@ -31,7 +34,7 @@ def get_headers():
"Content-Type": "application/json",
"x-api-key": settings.BANK_CALL_API_KEY,
"App-Id": settings.BANK_CALL_APP_ID,
"Authorization": result['access_token'] # no Bearer
"Authorization": result['access_token']
}
except requests.exceptions.RequestException as e: