Better Error Handling during Upload Failure and Setting Max File Length to Infinity

This commit is contained in:
Lunan Li 2021-09-13 20:36:52 -07:00
parent 8da05fe6f9
commit f5cade95e4

View File

@ -29,9 +29,12 @@ module.exports = async (query, request) => {
'Content-Length': String(query.songFile.size), 'Content-Length': String(query.songFile.size),
}, },
data: query.songFile.data, data: query.songFile.data,
maxContentLength: Infinity,
maxBodyLength: Infinity,
}) })
} catch (error) { } catch (error) {
console.log('error', error.response) console.log('error', error.response)
throw error.response
} }
return { return {
...tokenRes, ...tokenRes,