*: Improve MonitoredTasks' error capture

This commit is contained in:
Jens Langhammer
2020-10-16 16:00:24 +02:00
parent bdc019c7cf
commit 2339e855bb
5 changed files with 11 additions and 6 deletions

View File

@ -35,4 +35,4 @@ def ldap_sync(self: MonitoredTask, source_pk: int):
)
)
except LDAPException as exc:
self.set_status(TaskResult(TaskResultStatus.ERROR, [str(exc)], exc))
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))