Skip to content

Commit

Permalink
catch error detail in signup page
Browse files Browse the repository at this point in the history
  • Loading branch information
WongSaang committed Mar 15, 2023
1 parent 0d4b624 commit c9615ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pages/account/signup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ const submit = async () => {
errorMsg.value = error.value.data.non_field_errors[0]
}
} else {
errorMsg.value = 'Something went wrong. Please try again.'
if (error.value.data.detail) {
errorMsg.value = error.value.data.detail
} else {
errorMsg.value = 'Something went wrong. Please try again.'
}
}
} else {
$auth.setUser(data.value.user)
Expand Down

0 comments on commit c9615ed

Please sign in to comment.