Skip to content

Commit 23d9d78

Browse files
committed
fix: return S3 XML error from uploadPart on invalid partPath
Map partPath errors to InvalidRequest XML response (400) instead of bubbling up as a raw 500, consistent with completeMultipartUpload.
1 parent b31d19b commit 23d9d78

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/services/s3/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ func (p *S3Provider) uploadPart(_ context.Context, bucket, key, uploadID, partNu
889889

890890
partFile, err := p.partPath(uploadID, partNumber)
891891
if err != nil {
892-
return nil, err
892+
return xmlError("InvalidRequest", "invalid multipart request", http.StatusBadRequest), nil
893893
}
894894
if err := os.WriteFile(partFile, data, 0o644); err != nil {
895895
return nil, err

0 commit comments

Comments
 (0)