Skip to content

Commit

Permalink
Update project-save-hoc.jsx - error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
cami-espinozaq authored Nov 23, 2023
1 parent e9df63e commit 8e9676c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/project-save-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const ProjectSaveHOC = (WrappedComponent) => {
await this.saveMeta()
} catch (e) {
if (!this.requestCancelSave) {
console.log("error save:", e)
errPromise = this.setError('Das hat leider nicht geklappt')
} else {
errPromise = Promise.reject()
Expand All @@ -91,6 +92,8 @@ const ProjectSaveHOC = (WrappedComponent) => {
}

saveAssets() {
console.log("inside save assets")

const costumeAssets = serializeCostumes(this.props.vm.runtime)
const soundAssets = serializeSounds(this.props.vm.runtime)
return Promise.all(
Expand All @@ -107,6 +110,9 @@ const ProjectSaveHOC = (WrappedComponent) => {
filename: asset.fileName,
}),
})

console.log("save assets res", res)

if (!res.ok && res.status !== 409) {
throw new Error(`uploading an asset failed: ${asset.filename}`)
}
Expand Down

0 comments on commit 8e9676c

Please sign in to comment.