Skip to content

Commit 9a9026e

Browse files
author
Andrei Neagu
committed
making exception handling safer
1 parent 921d69f commit 9a9026e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/storage/src/simcore_service_storage/api/rpc/_async_jobs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ async def result(
105105
exception = pickle.loads(base64.b64decode(_result.args[0]))
106106
exc_type = type(exception).__name__
107107
exc_msg = f"{exception}"
108+
109+
if exception is None:
110+
_logger.warning("Was not expecting %s", exception)
108111
raise JobError(job_id=job_id, exc_type=exc_type, exc_msg=exc_msg, exc=exception)
109112

110113
return AsyncJobResult(result=_result)

0 commit comments

Comments
 (0)