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"
......@@ -31,11 +31,13 @@ const versionState = reactive<{
workflowVersion?: WorkflowVersion;
loading: boolean;
workflowExecutionError?: string;
errorText: string;
}>({
parameterSchema: undefined,
workflowVersion: undefined,
loading: false,
workflowExecutionError: undefined,
errorText: "",
});
watch(
......@@ -94,9 +96,7 @@ function startWorkflow(
})
.catch((err: ApiError) => {
console.error(err);
if (err.body["detail"].includes("workflow execution limit")) {
versionState.workflowExecutionError = "limit";
}
versionState.errorText = err.body["detail"] ?? "";
errorToast?.show();
})
.finally(() => {
......@@ -118,13 +118,8 @@ onMounted(() => {
>
<template #default>Error starting workflow</template>
<template #body>
<template v-if="versionState.workflowExecutionError === 'limit'">
You have too many active workflow executions to start a new one.
</template>
<template v-else>
There was an error with starting the workflow execution. Look in the
console for more information.
</template>
There was an error with starting the workflow execution:<br />
"{{ versionState.errorText }}"
</template>
</bootstrap-toast>
<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