Skip to content

Commit

Permalink
chore: Change reset password error message(chatwoot#2133)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhsin-k authored Apr 20, 2021
1 parent ea74462 commit 90de0e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/javascript/dashboard/routes/auth/ResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
</template>

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

0 comments on commit 90de0e4

Please sign in to comment.