Skip to content

Commit

Permalink
refactor: remove unused error handling (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson authored Oct 3, 2023
1 parent 0d7b0ec commit 656db1b
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 @@ -108,10 +108,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 @@ -145,8 +142,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 656db1b

Please sign in to comment.