Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

400 Bad Request on Storage.copy #1237

Copy link
Copy link

Description

@mziccard
Issue body actions

I started seeing this today. Sometimes our integration tests fail with the following error:

ITStorageTest.testCopyBlob:683 » Storage 400 Bad Request
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 
400 Bad Request
No file found in request.

The code that causes the error is the following:

String sourceBlobName = "test-copy-blob-source";
BlobId source = BlobId.of(BUCKET, sourceBlobName);
ImmutableMap<String, String> metadata = ImmutableMap.of("k", "v");
BlobInfo blob = BlobInfo.builder(source)
    .contentType(CONTENT_TYPE)
    .metadata(metadata)
    .build();
Blob remoteBlob = storage.create(blob, BLOB_BYTE_CONTENT);
assertNotNull(remoteBlob);
String targetBlobName = "test-copy-blob-target";
Storage.CopyRequest req = Storage.CopyRequest.of(source, BlobId.of(BUCKET, targetBlobName));
CopyWriter copyWriter = storage.copy(req); // Exception thrown here

What's weird is that we never experienced this error before today and it does not occur systematically. @Capstan any idea?

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.