Skip to content

Commit c81caba

Browse files
committed
added new error
1 parent d069867 commit c81caba

File tree

1 file changed

+17
-4
lines changed
  • packages/dask-task-models-library/src/dask_task_models_library/container_tasks

1 file changed

+17
-4
lines changed

packages/dask-task-models-library/src/dask_task_models_library/container_tasks/errors.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
""" Dask task exceptions
1+
"""Dask task exceptions"""
22

3-
"""
43
from common_library.errors_classes import OsparcErrorMixin
54

65

7-
class TaskValueError(OsparcErrorMixin, ValueError):
8-
...
6+
class TaskValueError(OsparcErrorMixin, ValueError): ...
97

108

119
class TaskCancelledError(OsparcErrorMixin, RuntimeError):
@@ -18,3 +16,18 @@ class ServiceRuntimeError(OsparcErrorMixin, RuntimeError):
1816
" running in container {container_id} failed with code"
1917
" {exit_code}. Last logs:\n{service_logs}"
2018
)
19+
20+
21+
class ServiceInputsBadlyFormattedError(OsparcErrorMixin, RuntimeError):
22+
msg_template = (
23+
"The service {service_key}:{service_version} contains badly formatted inputs"
24+
)
25+
26+
27+
class ServiceInputsUseFileToKeyMapButReceivesZipDataError(
28+
ServiceInputsBadlyFormattedError
29+
):
30+
msg_template = (
31+
"The service {service_key}:{service_version} {input} uses a file-to-key {file_to_key_map} map but receives zip data instead. "
32+
"TIP: either pass a single file or zip file and remove the file-to-key map parameter."
33+
)

0 commit comments

Comments
 (0)