Skip to content

Commit 735bb6a

Browse files
author
Andrei Neagu
committed
fixed error
1 parent b86f564 commit 735bb6a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/service-library/src/servicelib/long_running_tasks/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TaskExceptionError(BaseLongRunningError):
3636

3737
class TaskRaisedUnserializableError(BaseLongRunningError):
3838
msg_template: str = (
39-
"Task {task_id} finished with an unserializable exception: '{exception}'\n{traceback}"
39+
"Task {task_id} finished with an unserializable exception: '{exception}'"
4040
)
4141

4242

packages/service-library/tests/long_running_tasks/test_long_running_tasks_task.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,8 @@ async def test_get_result_finished_with_unpicklable_error(
419419
task_id, with_task_context=empty_context
420420
)
421421
assert result.str_error is not None # nosec
422-
error = loads(result.str_error)
423422
with pytest.raises(TaskRaisedUnserializableError, match="cannot pickle"):
424-
raise error
423+
loads(result.str_error)
425424

426425

427426
async def test_cancel_task_from_different_manager(

0 commit comments

Comments
 (0)