Skip to content

Commit

Permalink
Handle another PDMP exceptional case - upstream generated exception t…
Browse files Browse the repository at this point in the history
…ype (#33)

we need to capture and handle in the same sane manner.

Co-authored-by: Paul F Bugni <[email protected]>
  • Loading branch information
pbugni and Paul F Bugni authored Nov 18, 2021
1 parent ec859d6 commit 461148b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script_facade/api/fhir.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from flask import Blueprint, request, current_app
from requests import HTTPError
import timeit

from script_facade.client.client import rx_history_query, patient_lookup_query
Expand Down Expand Up @@ -93,6 +94,6 @@ def patient_search(fhir_version):
audit_entry(context='Patient', tags=['PDMP', 'search'], **kwargs)
try:
patient_bundle = patient_lookup_query(**kwargs)
except RuntimeError as error:
except (HTTPError, RuntimeError) as error:
return jsonify_abort(status_code=400, message=str(error))
return patient_bundle

0 comments on commit 461148b

Please sign in to comment.