Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
KateSakharova committed Jun 3, 2024
1 parent 51e3a6f commit 4a1c04b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def process_to_index_and_update_records(self, analyses_to_index_and_update):
sequence_accession=sequence_accession,
)
if not response:
logging.info(f"Error occured {annotation_job}")
logging.warning(f"Error occurred {annotation_job}")
continue
if response.ok:
logging.info(f"Successfully added {annotation_job}")
Expand Down
4 changes: 2 additions & 2 deletions emgapi/metagenomics_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import requests
from django.conf import settings
from requests.exceptions import HTTPError
from requests.exceptions import HTTPError, JSONDecodeError


class MetagenomicsExchangeAPI:
Expand Down Expand Up @@ -114,7 +114,7 @@ def add_analysis(self, mgya: str, sequence_accession: str):
try:
response_json = http_error.response.json()
logging.error(f"API response content: {response_json}")
except ValueError: # Catch JSON decoding errors
except JSONDecodeError: # Catch JSON decoding errors
logging.error(f"Failed to decode JSON from response: {http_error.response.text}")
except Exception as e:
logging.error(f"Unexpected error: {e}")
Expand Down

0 comments on commit 4a1c04b

Please sign in to comment.