give a better error message with unknown workflow exceptions w/ burnettk

This commit is contained in:
jasquat 2023-04-06 16:00:54 -04:00
parent a47a00bd7f
commit 4d9ea03a8f
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -158,7 +158,8 @@ class ApiError(Exception):
task_trace=exp.task_trace,
)
elif isinstance(exp, WorkflowException) and exp.task_spec:
return ApiError.from_task_spec(error_code, message, exp.task_spec)
msg = message + ". " + str(exp)
return ApiError.from_task_spec(error_code, msg, exp.task_spec)
else:
return ApiError("workflow_error", str(exp))