Skip to content

Commit 4913097

Browse files
committed
downgrade exception logs to warnings
1 parent 0ebf3e6 commit 4913097

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "taskbadger"
3-
version = "1.3.2"
3+
version = "1.3.3"
44
description = "The official Python SDK for Task Badger"
55
license = "Apache-2.0"
66

@@ -10,7 +10,7 @@ readme = "README.md"
1010
packages = [
1111
{include = "taskbadger"},
1212
]
13-
include = ["CHANGELOG.md", "taskbadger/internal/py.typed"]
13+
include = ["taskbadger/internal/py.typed"]
1414

1515
homepage = "https://taskbadger.net/"
1616
repository = "https://github.com/taskbadger/taskbadger-python"

taskbadger/celery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ def exit_session(signal_sender):
260260
def safe_get_task(task_id: str):
261261
try:
262262
return get_task(task_id)
263-
except Exception:
264-
log.exception("Error fetching task '%s'", task_id)
263+
except Exception as e:
264+
log.warning("Error fetching task '%s': %s", task_id, e)
265265

266266

267267
def _get_taskbadger_task_id(request):

taskbadger/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ def _update_task(task, **kwargs):
6363
def _update_safe(task, **kwargs):
6464
try:
6565
task.update(**kwargs)
66-
except Exception:
67-
log.exception("Error updating task '%s'", task.id)
66+
except Exception as e:
67+
log.warning("Error updating task '%s': %s", task.id, e)

taskbadger/safe_sdk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def create_task_safe(name: str, **kwargs: P.kwargs) -> Optional[Task]:
2929

3030
try:
3131
return create_task(name, **kwargs)
32-
except Exception:
33-
log.exception("Error creating task '%s'", name)
32+
except Exception as e:
33+
log.warning("Error creating task '%s': %s", name, e)
3434

3535

3636
def update_task_safe(task_id: str, **kwargs: P.kwargs) -> Optional[Task]:
@@ -48,5 +48,5 @@ def update_task_safe(task_id: str, **kwargs: P.kwargs) -> Optional[Task]:
4848

4949
try:
5050
return update_task(task_id, **kwargs)
51-
except Exception:
52-
log.exception("Error updating task '%s'", task_id)
51+
except Exception as e:
52+
log.warning("Error updating task '%s': %s", task_id, e)

taskbadger/sdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def safe_update(self, **kwargs):
345345
try:
346346
self.update(**kwargs)
347347
except Exception as e:
348-
log.exception("Error updating task '%s'", self._task.id)
348+
log.warning("Error updating task '%s': %s", self._task.id, e)
349349

350350

351351
def _none_to_unset(value):

0 commit comments

Comments
 (0)