Skip to content

Commit

Permalink
No stack traces for read timeouts
Browse files Browse the repository at this point in the history
We don't need full stack traces for read timeouts.
This patch shortens the error logs to:

```
May 06 12:04:42 vm350.rz.uni-osnabrueck.de opencast-camera-control[523905]: ERROR:occameracontrol.metrics:Failed to communicate with camera 'arec-15-421' @ 'http://camera1-15-421.example.com': HTTPConnectionPool(host='camera1-15-421.example.com', port=80): Read timed out. (read timeout=5)
```

This fixes #84
  • Loading branch information
lkiesow committed May 6, 2024
1 parent 019eb80 commit f5e98c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion occameracontrol/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class RequestErrorHandler():

err_msg_only = (
requests.exceptions.ConnectionError,
requests.exceptions.HTTPError)
requests.exceptions.HTTPError,
requests.exceptions.ReadTimeout)

def __init__(self, resource, message):
'''Create a RequestErrorHandler instance.
Expand Down

0 comments on commit f5e98c4

Please sign in to comment.