Skip to content

Commit 46501b5

Browse files
typecheck
1 parent c5e189a commit 46501b5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
from servicelib.rabbitmq import RPCRouter
2222

2323
from ...modules.celery import get_celery_client
24-
from ...modules.celery.errors import decode_celery_transferrable_error
24+
from ...modules.celery.errors import (
25+
TransferrableCeleryError,
26+
decode_celery_transferrable_error,
27+
)
2528
from ...modules.celery.models import TaskState
2629

2730
_logger = logging.getLogger(__name__)
@@ -102,6 +105,7 @@ async def result(
102105
# try to recover the original error
103106
exception = None
104107
with log_catch(_logger, reraise=False):
108+
assert isinstance(_result, TransferrableCeleryError) # nosec
105109
exception = decode_celery_transferrable_error(_result)
106110
exc_type = type(exception).__name__
107111
exc_msg = f"{exception}"

0 commit comments

Comments
 (0)