Skip to content

Commit

Permalink
refactor: display verification error message if present (#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
mantariksh authored Mar 24, 2021
1 parent 856d91f commit 8cbca13
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ function verifiableFieldController($q, $timeout, $interval) {
}

const getErrorMessage = (err) => {
// TODO (#941): keep only this code, remove switch case for custom strings
const serverErrorMsg = get(err, 'response.data.message')
if (serverErrorMsg) return serverErrorMsg

// So that switch case works for both axios error objects and string objects.
const error = get(err, 'response.data', err)
let errMessage = ''
Expand Down

0 comments on commit 8cbca13

Please sign in to comment.