From f5cade95e4d60f348aa7a47dfc8e9fef14c0457d Mon Sep 17 00:00:00 2001 From: Lunan Li Date: Mon, 13 Sep 2021 20:36:52 -0700 Subject: [PATCH] Better Error Handling during Upload Failure and Setting Max File Length to Infinity --- plugins/songUpload.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/songUpload.js b/plugins/songUpload.js index d94d8f4..89d85fc 100644 --- a/plugins/songUpload.js +++ b/plugins/songUpload.js @@ -29,9 +29,12 @@ module.exports = async (query, request) => { 'Content-Length': String(query.songFile.size), }, data: query.songFile.data, + maxContentLength: Infinity, + maxBodyLength: Infinity, }) } catch (error) { console.log('error', error.response) + throw error.response } return { ...tokenRes,