Skip to content

Commit

Permalink
#209: Change ICATSessionError exception to output exception message
Browse files Browse the repository at this point in the history
- When running the API, it was difficult to distinguish between the AuthenticationError affected in this commit, and the one a couple of lines above it
  • Loading branch information
MRichards99 committed Mar 15, 2021
1 parent d1559a6 commit a81c145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datagateway_api/common/icat/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def wrapper_requires_session(*args, **kwargs):
raise AuthenticationError("Forbidden")
else:
return method(*args, **kwargs)
except ICATSessionError:
raise AuthenticationError("Forbidden")
except ICATSessionError as e:
raise AuthenticationError(e)

return wrapper_requires_session

Expand Down

0 comments on commit a81c145

Please sign in to comment.