fix(ui): a failed step restart names the run and step it was for
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -35,7 +35,7 @@ export const workflows = {
|
||||
stagesNotLoaded: "Couldn't load the run's stages",
|
||||
},
|
||||
editor: {
|
||||
restartFailed: "Restart failed",
|
||||
restartFailed: (run: string, step: string, detail: string) => `Couldn't restart run #${run} from ${step}: ${detail}`,
|
||||
draftNotSaved: "Draft not saved. Your edit is still in the editor.",
|
||||
stepIdTaken: (id: string) => `Another step is already called ${id}.`,
|
||||
stepTypesUnavailable: "Step types didn't load, so steps can't be opened or checked.",
|
||||
|
||||
@@ -112,7 +112,7 @@ async function restartFrom(from: string): Promise<void> {
|
||||
await api.taskAction(watched.value, "retry", { resume_from: from });
|
||||
await refresh();
|
||||
} catch (err) {
|
||||
restartError.value = describeError(err, errors.workflows.editor.restartFailed);
|
||||
restartError.value = errors.workflows.editor.restartFailed(watched.value, from, describeError(err, errors.common.unknown));
|
||||
} finally {
|
||||
restarting.value = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user