diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue index e4c48fccb..187ac9ad5 100644 --- a/resources/assets/js/components/Profile.vue +++ b/resources/assets/js/components/Profile.vue @@ -1078,7 +1078,11 @@ this.$refs.visitorContextMenu.hide(); swal('Success', 'You have successfully muted ' + this.profile.acct, 'success'); }).catch(err => { - swal('Error', 'Something went wrong. Please try again later.', 'error'); + if(err.response.status == 422) { + swal('Error', err.response.data.error, 'error'); + } else { + swal('Error', 'Something went wrong. Please try again later.', 'error'); + } }); }, @@ -1113,7 +1117,11 @@ this.$refs.visitorContextMenu.hide(); swal('Success', 'You have successfully blocked ' + this.profile.acct, 'success'); }).catch(err => { - swal('Error', 'Something went wrong. Please try again later.', 'error'); + if(err.response.status == 422) { + swal('Error', err.response.data.error, 'error'); + } else { + swal('Error', 'Something went wrong. Please try again later.', 'error'); + } }); },