Skip to content

Commit a0f7a4a

Browse files
authored
Log failing snapshot URI to improve debug (#86)
1 parent 5af7c03 commit a0f7a4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

onvif/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,9 @@ async def get_snapshot(
576576
try:
577577
response = await self._snapshot_client.get(uri, auth=auth)
578578
except httpx.TimeoutException as error:
579-
raise ONVIFTimeoutError(error) from error
579+
raise ONVIFTimeoutError(f"Timed out fetching {uri}: {error}") from error
580580
except httpx.RequestError as error:
581-
raise ONVIFError(error) from error
581+
raise ONVIFError(f"Error fetching {uri}: {error}") from error
582582

583583
if response.status_code == 401:
584584
raise ONVIFAuthError(f"Failed to authenticate to {uri}")

0 commit comments

Comments
 (0)