Skip to content

[Bug] - The InvalidRange error should include RangeRequested and ActualObjectSize props. #2069

@niksis02

Description

@niksis02

Describe the bug
The InvalidRange error should include RangeRequested and ActualObjectSize properties in the xml response.

To Reproduce

aws s3api create-bucket --bucket test
// create a 100 byte object
aws s3api put-object --bucket test --key obj --body 100_byte_obj.bin
// GetObject with invalid range: start offset is greater than object size
aws s3api get-object --bucket test --key obj --range "bytes=102-200" obj --debug

Expected behavior
The xml response should have the following structure:

<?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>InvalidRange</Code><Message>The requested range is not satisfiable</Message><RangeRequested>bytes=102-200</RangeRequested><ActualObjectSize>100</ActualObjectSize><RequestId>X22A7FJ34SENFQ6W</RequestId><HostId>Wd3x60sC5WhLPT+SNpDDAYuUcTBr/RPmNdU0y3Fpmqx1iN4wdioXM4jlYPMbg5MLgVpo9RwgjwM=</HostId></Error>

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions