Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tihuan committed Dec 23, 2024
1 parent d81ca4c commit 18feafd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/common/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,12 @@ def gene_info_get(request):
"""
api_base_url = current_app.app_config.server__gene_info__api_base
headers = {"Content-Type": "application/json", "Accept": "application/json"}
url = f"{api_base_url}/gene_info?geneID={request.args['geneID']}&gene={request.args['gene']}"

current_app.logger.info(f"👀👀👀👀 Requesting gene info from {url}")

try:
response = requests.get(
url=f"{api_base_url}/gene_info?geneID={request.args['geneID']}&gene={request.args['gene']}", headers=headers
)
response = requests.get(url=url, headers=headers)
if response.status_code == 200:
# DEBUG
# DEBUG
Expand All @@ -310,7 +312,7 @@ def gene_info_get(request):
# DEBUG
# DEBUG
# DEBUG
current_app.logger.error(f"Error: Received status code {response.status_code} from API")
current_app.logger.error(f"Error:☠️☠️☠️☠️☠️☠️ Received status code {response.status_code} from API")
current_app.logger.error(f"Response content: {response.text}")
return None
except Exception as e:
Expand Down

0 comments on commit 18feafd

Please sign in to comment.