chore: Change reset password error message(#2133)

This commit is contained in:
Muhsin Keloth
2021-04-20 13:24:33 +05:30
committed by GitHub
parent ea74462209
commit 90de0e4843

View File

@@ -28,7 +28,6 @@
</template> </template>
<script> <script>
/* global bus */
import { required, minLength, email } from 'vuelidate/lib/validators'; import { required, minLength, email } from 'vuelidate/lib/validators';
import Auth from '../../api/auth'; import Auth from '../../api/auth';
import { frontendURL } from '../../helper/URLHelper'; import { frontendURL } from '../../helper/URLHelper';
@@ -74,8 +73,12 @@ export default {
this.showAlert(successMessage); this.showAlert(successMessage);
window.location = frontendURL('login'); window.location = frontendURL('login');
}) })
.catch(() => { .catch(error => {
this.showAlert(this.$t('RESET_PASSWORD.API.ERROR_MESSAGE')); let errorMessage = this.$t('RESET_PASSWORD.API.ERROR_MESSAGE');
if (error?.response?.data?.message) {
errorMessage = error.response.data.message;
}
this.showAlert(errorMessage);
}); });
}, },
}, },