Browse Source

Removed extra console logging, and added better error handling for saving metadata.

pull/170/head
Michael Olund 5 years ago
parent
commit
a831ab72d5
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      vue/src/components/Uploader/Uploader.vue

+ 9
- 2
vue/src/components/Uploader/Uploader.vue View File

@ -331,7 +331,15 @@ export default {
}
`})
.then(response => {
console.log('response', response);
// check for errors in the graphQL response
if (response.data.errors && response.data.errors.length) {
response.data.errors.forEach((error) => {
console.log('error', error.message || error);
// if there was an error it's probably because the upload isn't finished yet
// mark the metadata as dirty so it will save metadata again
this.isDirty = true;
})
}
})
.catch((error) => {
this.showError('Error saving metadata');
@ -352,7 +360,6 @@ export default {
`,
variables: null})
.then(response => {
console.log('response', response);
response.data.data.documents.forEach((doc) => {
this.files.push({
name: doc.filename,


Loading…
Cancel
Save