diff --git a/resources/js/components/inputs/relationship/InlinePublishForm.vue b/resources/js/components/inputs/relationship/InlinePublishForm.vue index 7711035e75..b7be07963e 100644 --- a/resources/js/components/inputs/relationship/InlinePublishForm.vue +++ b/resources/js/components/inputs/relationship/InlinePublishForm.vue @@ -69,14 +69,20 @@ export default { methods: { getItem() { - this.$axios.get(this.itemUrl).then(response => { - for (const prop in this.componentProps) { - const value = data_get(response.data, this.componentProps[prop]); - this.$set(this.componentPropValues, prop, value); - } - - this.loading = false; - }); + this.$axios.get(this.itemUrl) + .then(response => { + for (const prop in this.componentProps) { + const value = data_get(response.data, this.componentProps[prop]); + this.$set(this.componentPropValues, prop, value); + } + + this.loading = false; + }).catch((error) => { + if (error.response.status === 403) { + this.$toast.error(__('This action is unauthorized.')); + this.close(); + } + }); }, close() {