Wrapped additional error data under data
This commit is contained in:
@@ -45,9 +45,9 @@ class AuthStore {
|
||||
this.team = res.data.team;
|
||||
});
|
||||
} catch (err) {
|
||||
if (err.data.error === 'user_suspended') {
|
||||
if (err.error.error === 'user_suspended') {
|
||||
this.isSuspended = true;
|
||||
this.suspendedContactEmail = err.data.adminEmail;
|
||||
this.suspendedContactEmail = err.error.data.adminEmail;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ class ApiClient {
|
||||
})
|
||||
.catch(error => {
|
||||
error.response.json().then(json => {
|
||||
error.data = json;
|
||||
error.error = json;
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user