aboutsummaryrefslogtreecommitdiff
path: root/src/modules/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/users.js')
-rw-r--r--src/modules/users.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/users.js b/src/modules/users.js
index 3cd38d56..d06e77c7 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -393,7 +393,7 @@ const users = {
}
},
async getCaptcha (store) {
- return await store.rootState.api.backendInteractor.getCaptcha()
+ return store.rootState.api.backendInteractor.getCaptcha()
},
logout (store) {
@@ -451,9 +451,9 @@ const users = {
// Authentication failed
commit('endLogin')
if (response.status === 401) {
- reject('Wrong username or password')
+ reject(new Error('Wrong username or password'))
} else {
- reject('An error occurred, please try again')
+ reject(new Error('An error occurred, please try again'))
}
}
commit('endLogin')
@@ -462,7 +462,7 @@ const users = {
.catch((error) => {
console.log(error)
commit('endLogin')
- reject('Failed to connect to server, try again')
+ reject(new Error('Failed to connect to server, try again'))
})
})
}