Browse Source

feat(nocodb): throw e.response.data.msg if possible

pull/4571/head
Wing-Kam Wong 2 years ago
parent
commit
16d8e4c15b
  1. 6
      packages/nocodb/src/lib/meta/api/userApi/ui/auth/resetPassword.ts
  2. 6
      packages/nocodb/src/lib/v1-legacy/rest/ui/auth/resetPassword.ts

6
packages/nocodb/src/lib/meta/api/userApi/ui/auth/resetPassword.ts

@ -86,7 +86,11 @@ export default `<!DOCTYPE html>
});
this.success = true;
} catch (e) {
alert('Failed to reset password: ' + e.response.data.msg)
if (e.response && e.response.data && e.response.data.msg) {
alert('Failed to reset password: ' + e.response.data.msg)
} else {
alert('Some error occurred')
}
}
}
}

6
packages/nocodb/src/lib/v1-legacy/rest/ui/auth/resetPassword.ts

@ -86,7 +86,11 @@ export default `<!DOCTYPE html>
});
this.success = true;
} catch (e) {
alert('Failed to reset password: ' + e.response.data.msg)
if (e.response && e.response.data && e.response.data.msg) {
alert('Failed to reset password: ' + e.response.data.msg)
} else {
alert('Some error occurred')
}
}
}
}

Loading…
Cancel
Save