Bug: Fix error message when existing agent email is reused for a new agent (#538)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
This commit is contained in:
@@ -128,7 +128,11 @@ export default {
|
||||
this.showAlert(this.$t('AGENT_MGMT.ADD.API.SUCCESS_MESSAGE'));
|
||||
this.onClose();
|
||||
} catch (error) {
|
||||
this.showAlert(this.$t('AGENT_MGMT.ADD.API.ERROR_MESSAGE'));
|
||||
if (error.response.status === 422) {
|
||||
this.showAlert(this.$t('AGENT_MGMT.ADD.API.EXIST_MESSAGE'));
|
||||
} else {
|
||||
this.showAlert(this.$t('AGENT_MGMT.ADD.API.ERROR_MESSAGE'));
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user