Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[download] Server propagates the s3-backend feedback message to the user if a file/dataset does not exist #1088

Open
2 tasks
aaperis opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@aaperis
Copy link
Contributor

aaperis commented Oct 21, 2024

Describe the bug
Trying to fetch a non-existent file with sda-download returns an s3-backend-propagated message to the user.

Steps to reproduce
the following:

curl -s --location 'https://staging-download.gdi.nbis.se/s3-encrypted/someDatasetID/someFileID' --header "Authorization
: Bearer $token"

returns

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult><Buckets></Buckets><Owner></Owner></ListAllMyBucketsResult>

with code 200 whereas an s3 backend would give:

HTTP/1.1 404 Not Found
< content-length: 233
< x-amz-request-id: tx0000074b017e3d72253d7-006735bc6d-6a91224-default
< accept-ranges: bytes
< content-type: application/xml
< date: Thu, 14 Nov 2024 09:01:33 GMT
< 
* Connection #0 to host storage.sto3.safedc.net left intact
<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchBucket</Code><BucketName>gdi-staging-publi</BucketName><RequestId>tx0000074b017e3d72253d7-006735bc6d-6a91224-default</RequestId><HostId>6a91224-default-default</HostId></Error>

Expected behavior

  • a 404 status returned, mimicking s3 backend behavior e.g. see above
  • Tests verifying the fix are added

Additional context

Estimation of size: small

Estimation of priority: low

@aaperis aaperis added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant