Skip to content

Commit

Permalink
Improve error txt
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Sep 16, 2024
1 parent 3b4fe29 commit ad6f8dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ def __init__(self, params, uid=None):
cur.execute(query)
result = cur.fetchall()
if not result:
raise HTTPException(status_code=404, detail="Invalid iso3 code")
raise HTTPException(status_code=404, detail="iso3 code not found in db")
result = result[0]
(
self.cid,
Expand Down Expand Up @@ -1685,7 +1685,7 @@ def clean_resources(self):

def process_custom_categories(self):
"""
Processes HDX tags and executes category processing in parallel.
Processes Custom tags and executes category processing in parallel.
Returns:
- Dictionary containing the processed dataset information.
Expand Down
4 changes: 2 additions & 2 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def get_db_connection_params() -> dict:
db_credentials = os.environ["REMOTE_DB"]

except KeyError:
logger.debug("EnvVar: REMOTE_DB not supplied; Falling back to other means")
# logger.debug("EnvVar: REMOTE_DB not supplied; Falling back to other means")

connection_params = dict(
host=os.environ.get("PGHOST") or config.get("DB", "PGHOST"),
Expand Down Expand Up @@ -439,7 +439,7 @@ def get_oauth_credentials() -> tuple:
try:
oauth2_credentials = os.environ["REMOTE_OAUTH"]
except KeyError:
logger.debug("EnvVar: REMOTE_OAUTH not supplied; Falling back to other means")
# logger.debug("EnvVar: REMOTE_OAUTH not supplied; Falling back to other means")

client_id = os.environ.get("OSM_CLIENT_ID") or config.get(
"OAUTH", "OSM_CLIENT_ID"
Expand Down

0 comments on commit ad6f8dd

Please sign in to comment.