Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
error(config) {
if (typeof config === 'string')
return message.error({
content: config,
duration: 5,
})
if (typeof config === 'object')
return message.error({
duration: 5,
...config,
})
},
loading(config) {
.catch(err => {
Message.error(err.body.error);
});
},
.catch(err => {
this.loading = false;
this.message = err.body.error;
if (err.status !== 401) {
Message.error(err.body.error);
return;
}
if (err.body.passwordRequired) {
this.auth.passwordRequired = true;
} else {
this.auth.private = true;
}
});
},
.catch(err => {
Message.error(err.body.error);
});
} else {
.catch(res => {
Message.error(res.body.error);
});
} else {