diff options
Diffstat (limited to 'gn_auth/auth')
| -rw-r--r-- | gn_auth/auth/authorisation/data/phenotypes.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gn_auth/auth/authorisation/data/phenotypes.py b/gn_auth/auth/authorisation/data/phenotypes.py index 20f887c..1f79e0e 100644 --- a/gn_auth/auth/authorisation/data/phenotypes.py +++ b/gn_auth/auth/authorisation/data/phenotypes.py @@ -221,7 +221,8 @@ def fetch_resource_id(cursor: authdb.DbCursor, tuple(str(_id) for _id in data_link_ids)) _ids = tuple(uuid.UUID(row['resource_id']) for row in cursor.fetchall()) if len(_ids) != 1: - raise InvalidResourceError("...") + raise AuthorisationError( + f"Expected data from 1 resource, got {len(_ids)} resources.") return _ids[0] |
