Skip to content

Log failing snapshot URI to improve debug #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions onvif/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,9 @@
try:
response = await self._snapshot_client.get(uri, auth=auth)
except httpx.TimeoutException as error:
raise ONVIFTimeoutError(error) from error
raise ONVIFTimeoutError(f"Timed out fetching {uri}: {error}") from error

Check warning on line 579 in onvif/client.py

View check run for this annotation

Codecov / codecov/patch

onvif/client.py#L579

Added line #L579 was not covered by tests
except httpx.RequestError as error:
raise ONVIFError(error) from error
raise ONVIFError(f"Error fetching {uri}: {error}") from error

Check warning on line 581 in onvif/client.py

View check run for this annotation

Codecov / codecov/patch

onvif/client.py#L581

Added line #L581 was not covered by tests

if response.status_code == 401:
raise ONVIFAuthError(f"Failed to authenticate to {uri}")
Expand Down
Loading