You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error message from AXIOS should provide the XML error message that S3 returns. Instead, AXIOS fails.
Environment
Axios Version : 0.24.0
Node.js Version: v14.17.4
OS: OS 12.3
Additional context/Screenshots
I am using Axios to upload an asset to S3 using signed URLs.
It works correctly for files under the upload size limit, but when trying to upload an asset (.tiff, 114 Mb) over the upload size limit (50 Mb), I cannot get the XML error from S3.
When I use the request library to run the upload to S3, I get this as the error content :
UPLOAD FAILED. Status Code: 400. Error message: <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>EntityTooLarge</Code><Message>Your proposed upload exceeds the maximum allowed size</Message><ProposedSize>52432788</ProposedSize><MaxSizeAllowed>52428800</MaxSizeAllowed><RequestId>N8RFYCS0K10GB4FF</RequestId><HostId>2OaG69rf19DMxItXx8J//rscZuSbxU8hJ/93du/a1zaFwAZa6jN2v1xCDebW4MRMgW3Kfuw0n10=</HostId></Error>
But when I use AXIOS, I get back the error code 400 (good), but no XML message back:
Any idea how can I get back the XML from S3 describing the issue?
I want to present it as the cause of the error. The AXIOS error message ("Request failed with status code 400") does not give any context of what the issue was: file size over the size limit for upload.
Thanks!
The text was updated successfully, but these errors were encountered:
Describe the issue
Axios does not return XML error message from S3 when uploading asset over the size limit
Example Code
This is the code I am running for the upload to S3:
Expected behavior, if applicable
Error message from AXIOS should provide the XML error message that S3 returns. Instead, AXIOS fails.
Environment
Additional context/Screenshots
I am using Axios to upload an asset to S3 using signed URLs.
It works correctly for files under the upload size limit, but when trying to upload an asset (.tiff, 114 Mb) over the upload size limit (50 Mb), I cannot get the XML error from S3.
When I use the request library to run the upload to S3, I get this as the error content :
But when I use AXIOS, I get back the error code 400 (good), but no XML message back:
Any idea how can I get back the XML from S3 describing the issue?
I want to present it as the cause of the error. The AXIOS error message (
"Request failed with status code 400"
) does not give any context of what the issue was: file size over the size limit for upload.Thanks!
The text was updated successfully, but these errors were encountered: