diff --git a/src/components/model-crud/ByjoveModelCrud.vue b/src/components/model-crud/ByjoveModelCrud.vue index 9419322..b1cdd87 100644 --- a/src/components/model-crud/ByjoveModelCrud.vue +++ b/src/components/model-crud/ByjoveModelCrud.vue @@ -512,18 +512,24 @@ export default { this.fetchRows(uuid) } }, response => { - if (response.status == 403) { // forbidden; redirect to model index + if (response.status == 403) { // forbidden this.$buefy.toast.open({ message: "You do not have permission to access that page.", type: 'is-danger', }) - this.$router.push(this.getModelPathPrefix() + '/') - } else { + } else if (response.status == 404) { // notfound + this.$buefy.toast.open({ + message: `The requested ${this.getModelTitle()} was not found.`, + type: 'is-danger', + }) + } else { // other error this.$buefy.toast.open({ message: "Failed to fetch page data!", type: 'is-danger', }) } + // redirect to model index + this.$router.push(this.getIndexURL()) }) },