Skip to content

Commit

Permalink
chore: update error message in education form
Browse files Browse the repository at this point in the history
  • Loading branch information
duchunter committed Sep 11, 2023
1 parent 7acfbde commit df3df05
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/renderer/components/pages/education/EducationPackForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default {
this.showSuccess = true
} catch (error) {
const errorData = error.response?.data
let errorMessage = errorData?.message
let errorMessage = ''
// Account not exists
if (errorData?.code === '1004') {
Expand Down Expand Up @@ -329,12 +329,14 @@ export default {
// Invalid code
if (errorData?.details?.education_email) {
errorMessage = 7018
} else {
errorMessage = 'invalid_data'
}
}
if (!errorMessage) {
if (errorData?.message) {
this.notify(errorData?.message, 'warning')
return
}
errorMessage = 'something_went_wrong'
}
Expand Down

0 comments on commit df3df05

Please sign in to comment.