mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
🐛 Add error pop up and redirection for non existing workflow IDs (#2516)
* 🐛 Add error pop up and redirection for non existing workflow IDs
* Remove code comments
This commit is contained in:
parent
2081aedc81
commit
d62c7a7f3c
|
@ -1633,11 +1633,19 @@ export default mixins(
|
||||||
if (workflowId !== null) {
|
if (workflowId !== null) {
|
||||||
const workflow = await this.restApi().getWorkflow(workflowId);
|
const workflow = await this.restApi().getWorkflow(workflowId);
|
||||||
if (!workflow) {
|
if (!workflow) {
|
||||||
throw new Error('Could not find workflow');
|
this.$router.push({
|
||||||
}
|
name: "NodeViewNew",
|
||||||
|
});
|
||||||
|
this.$showMessage({
|
||||||
|
title: 'Error',
|
||||||
|
message: 'Could not find workflow',
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
this.$titleSet(workflow.name, 'IDLE');
|
this.$titleSet(workflow.name, 'IDLE');
|
||||||
// Open existing workflow
|
// Open existing workflow
|
||||||
await this.openWorkflow(workflowId);
|
await this.openWorkflow(workflowId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Create new workflow
|
// Create new workflow
|
||||||
await this.newWorkflow();
|
await this.newWorkflow();
|
||||||
|
|
Loading…
Reference in a new issue