mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-01-18 14:14:50 +08:00
log all possible errors on project setting save
Signed-off-by: MiniDigger <admin@minidigger.me>
This commit is contained in:
parent
b8639c5477
commit
2bc0a207e9
@ -446,6 +446,7 @@ export default {
|
||||
this.showError('license-name-input');
|
||||
return;
|
||||
}
|
||||
const self = this;
|
||||
axios
|
||||
.post(this.ROUTES.parse('PROJECTS_SAVE', this.project.project.ownerName, this.project.project.slug), data, window.ajaxSettings)
|
||||
.then(() => {
|
||||
@ -454,19 +455,22 @@ export default {
|
||||
.catch((err) => {
|
||||
if (err.response.headers['content-type'] === 'application/json') {
|
||||
this.error = this.$t(err.response.data.messageKey, err.response.data.messageArgs);
|
||||
document.getElementById('project-settings-error').scrollIntoView({
|
||||
inline: 'nearest',
|
||||
block: 'nearest',
|
||||
behavior: 'smooth',
|
||||
});
|
||||
setTimeout(
|
||||
() => {
|
||||
self.error = null;
|
||||
},
|
||||
5000,
|
||||
this
|
||||
);
|
||||
} else {
|
||||
this.error = "Error while saving, " + err.message; // TODO move to i18n
|
||||
console.log(err);
|
||||
}
|
||||
document.getElementById('project-settings-error').scrollIntoView({
|
||||
inline: 'nearest',
|
||||
block: 'nearest',
|
||||
behavior: 'smooth',
|
||||
});
|
||||
setTimeout(
|
||||
() => {
|
||||
self.error = null;
|
||||
},
|
||||
5000,
|
||||
this
|
||||
);
|
||||
});
|
||||
},
|
||||
handleFileChange(target) {
|
||||
|
Loading…
Reference in New Issue
Block a user