Skip to content

Commit b177143

Browse files
committed
Fix exceptions
1 parent c9b93a6 commit b177143

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/labelbox/src/labelbox/schema/dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ def add_iam_integration(self, iam_integration: Union[str, IAMIntegration]) -> IA
968968
response = self.client.execute(query, {"signerId": iam_integration_id, "datasetId": self.uid})
969969

970970
if not response:
971-
raise LabelboxError(f"Can't set IAM integration {iam_integration_id}")
971+
raise ResourceNotFoundError(IAMIntegration, {"signerId": iam_integration_id, "datasetId": self.uid})
972972

973973
try:
974974
iam_integration_id = response.get("setSignerForDataset", {}).get("signer", {})["id"]
@@ -1011,6 +1011,6 @@ def remove_iam_integration(self) -> None:
10111011
if response:
10121012
return response.get("clearSignerForDataset", {}).get("signer")
10131013
else:
1014-
raise LabelboxError("Can't unset IAM integration")
1014+
raise ResourceNotFoundError(IAMIntegration, {"datasetId": self.uid})
10151015

10161016

0 commit comments

Comments
 (0)