Compare commits

..

No commits in common. "2eb9d5ad57b303261e6c0601f1068c49863113a3" and "4b2bf59a609b85ca0bfcc9b71438db782f11983d" have entirely different histories.

3 changed files with 16 additions and 8 deletions

View File

@ -491,16 +491,17 @@ export class ApiCallService implements OnApplicationShutdown {
if (multipartFile.file.truncated) {
throw createTooLongError();
}
} catch (err) {
} finally {
cleanup();
throw err;
}
return {
attachmentFile: {
const attachmentFile = {
name: multipartFile.filename,
path,
},
};
return {
attachmentFile,
cleanup,
};
}

View File

@ -196,7 +196,11 @@ export async function uploadFile(
body.append('name', filename);
return await fetch(`https://${host}/api/drive/files/create`, { method: 'POST', body })
.then(async res => await res.json());
.then(async res => await res.json())
.catch(err => {
console.error('-- error :', JSON.stringify(err));
throw err;
});
}
export async function addCustomEmoji(

View File

@ -122,7 +122,10 @@ export class APIClient {
...body.error,
});
}
}).catch(reject);
}).catch(err => {
console.error('-- error :', JSON.stringify(err));
reject(err);
});
});
}
}