Skip to content

Commit

Permalink
refactor: add improved error message for Python ICAT WHERE filter iss…
Browse files Browse the repository at this point in the history
…ues #260
  • Loading branch information
MRichards99 committed Dec 20, 2021
1 parent 6b82732 commit 4e05d64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datagateway_api/src/datagateway_api/icat/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ def apply_filter(self, query):
try:
log.info("Adding ICAT where filter (for %s) to query", self.value)
query.addConditions(self.create_filter())
except ValueError:
except ValueError as e:
raise FilterError(
"Something went wrong when adding WHERE filter to ICAT query",
"Something went wrong when adding WHERE filter to ICAT query:"
f" {e.args}",
)

def create_filter(self):
Expand Down

0 comments on commit 4e05d64

Please sign in to comment.