Skip to content

Commit 9eeb729

Browse files
committed
showing correct alert with exact message of error
1 parent 3d73023 commit 9eeb729

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/settings/actions/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ export const saveProfileSettings = (settings) => (dispatch, getState) => {
235235
})
236236
})
237237
.catch((err) => {
238-
Alert.error(`Failed to save settings. ${err.message}`)
238+
const errorMsg = _.get(err, 'response.data.result.content', err.message)
239+
Alert.error(`Failed to save settings. ${errorMsg}`)
239240
dispatch({
240241
type: SAVE_PROFILE_SETTINGS_FAILURE
241242
})

0 commit comments

Comments
 (0)