Skip to content

Commit

Permalink
refactor: remove unused error handling (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson authored Oct 10, 2023
1 parent f11a48f commit 1a1ec10
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/gene/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@ def normalize(q: str = Query(..., description=normalize_q_descr)) -> NormalizeSe
:param str q: gene search term
:return: JSON response with normalized gene concept
"""
try:
resp = query_handler.normalize(html.unescape(q))
except InvalidParameterException as e:
raise HTTPException(status_code=422, detail=str(e))
resp = query_handler.normalize(html.unescape(q))
return resp


Expand Down Expand Up @@ -148,8 +145,5 @@ def normalize_unmerged(
:param q: Gene search term
:returns: JSON response with matching normalized record and source metadata
"""
try:
response = query_handler.normalize_unmerged(html.unescape(q))
except InvalidParameterException as e:
raise HTTPException(status_code=422, detail=str(e))
response = query_handler.normalize_unmerged(html.unescape(q))
return response

0 comments on commit 1a1ec10

Please sign in to comment.