Skip to content

Commit 44a378a

Browse files
authored
@uppy/aws-s3: console.error instead of throw for missing etag (#5521)
* @uppy/aws-s3: console.error instead of throw for missing etag * Improve
1 parent fb8e446 commit 44a378a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/@uppy/aws-s3/src/index.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -760,18 +760,19 @@ export default class AwsS3Multipart<
760760
}
761761
const { etag, location } = headersMap
762762

763+
// More info bucket settings when this is not present:
764+
// https://github.com/transloadit/uppy/issues/5388#issuecomment-2464885562
763765
if (method.toUpperCase() === 'POST' && location == null) {
764766
// Not being able to read the Location header is not a fatal error.
765767
// eslint-disable-next-line no-console
766-
console.warn(
767-
'AwsS3/Multipart: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.',
768+
console.error(
769+
'@uppy/aws-s3: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3/#setting-up-your-s3-bucket',
768770
)
769771
}
770772
if (etag == null) {
771-
reject(
772-
new Error(
773-
'AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.',
774-
),
773+
// eslint-disable-next-line no-console
774+
console.error(
775+
'@uppy/aws-s3: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3/#setting-up-your-s3-bucket',
775776
)
776777
return
777778
}

0 commit comments

Comments
 (0)