Skip to content

Commit 1fa3b8f

Browse files
committed
narrow handled exception types
1 parent 0414b50 commit 1fa3b8f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/tests/integration/test_raw_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import httpx2
99
import pytest
1010

11+
from bubble_data_api_client.exceptions import BubbleAPIError
1112
from bubble_data_api_client.types import BubbleField
1213

1314
if TYPE_CHECKING:
@@ -81,7 +82,7 @@ async def test_bulk_create_success(typename: str, bubble_raw_client: raw_client.
8182
for uid in created_ids:
8283
try:
8384
await bubble_raw_client.delete(typename=typename, uid=uid)
84-
except Exception as e:
85+
except (BubbleAPIError, httpx2.HTTPError) as e:
8586
warnings.warn(f"cleanup failed for {uid}: {e}", stacklevel=2)
8687

8788

@@ -112,7 +113,7 @@ async def test_bulk_create_parsed_success(typename: str, bubble_raw_client: raw_
112113
for uid in created_ids:
113114
try:
114115
await bubble_raw_client.delete(typename=typename, uid=uid)
115-
except Exception as e:
116+
except (BubbleAPIError, httpx2.HTTPError) as e:
116117
warnings.warn(f"cleanup failed for {uid}: {e}", stacklevel=2)
117118

118119

0 commit comments

Comments
 (0)