Skip to content
Snippets Groups Projects
Verified Commit 68d43c64 authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Show raw error message when unsuccessfully staring a workflow execution

parent 75415fc1
No related branches found
No related tags found
1 merge request!103Resolve "Show raw error message when starting a workflow throws an error"
Pipeline #48534 passed
...@@ -31,11 +31,13 @@ const versionState = reactive<{ ...@@ -31,11 +31,13 @@ const versionState = reactive<{
workflowVersion?: WorkflowVersion; workflowVersion?: WorkflowVersion;
loading: boolean; loading: boolean;
workflowExecutionError?: string; workflowExecutionError?: string;
errorText: string;
}>({ }>({
parameterSchema: undefined, parameterSchema: undefined,
workflowVersion: undefined, workflowVersion: undefined,
loading: false, loading: false,
workflowExecutionError: undefined, workflowExecutionError: undefined,
errorText: "",
}); });
watch( watch(
...@@ -94,9 +96,7 @@ function startWorkflow( ...@@ -94,9 +96,7 @@ function startWorkflow(
}) })
.catch((err: ApiError) => { .catch((err: ApiError) => {
console.error(err); console.error(err);
if (err.body["detail"].includes("workflow execution limit")) { versionState.errorText = err.body["detail"] ?? "";
versionState.workflowExecutionError = "limit";
}
errorToast?.show(); errorToast?.show();
}) })
.finally(() => { .finally(() => {
...@@ -118,13 +118,8 @@ onMounted(() => { ...@@ -118,13 +118,8 @@ onMounted(() => {
> >
<template #default>Error starting workflow</template> <template #default>Error starting workflow</template>
<template #body> <template #body>
<template v-if="versionState.workflowExecutionError === 'limit'"> There was an error with starting the workflow execution:<br />
You have too many active workflow executions to start a new one. "{{ versionState.errorText }}"
</template>
<template v-else>
There was an error with starting the workflow execution. Look in the
console for more information.
</template>
</template> </template>
</bootstrap-toast> </bootstrap-toast>
<parameter-schema-form-component <parameter-schema-form-component
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment