This commit is contained in:
Dan 2023-04-23 12:27:40 -04:00
parent fb7c600e99
commit 96703f8e70
1 changed files with 4 additions and 5 deletions

View File

@ -416,13 +416,12 @@ def _interstitial_stream(process_instance_id: int) -> Generator[str, Optional[st
yield f"data: {current_app.json.dumps(api_error)} \n\n"
except Exception as e:
api_error = ApiError(
error_code="engine_steps_error",
message=f"Failed complete an automated task. Error was: {str(e)}",
status_code=400,
)
error_code="engine_steps_error",
message=f"Failed complete an automated task. Error was: {str(e)}",
status_code=400,
)
yield f"data: {current_app.json.dumps(api_error)} \n\n"
# Note, this has to be done in case someone leaves the page,
# which can otherwise cancel this function and leave completed tasks un-registered.
spiff_task = processor.next_task()