Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Upload initiation fails due to asserting wrong HTTP status code #124

@lisandromc

Description

@lisandromc

Code in module _upload.py, line 453 of method _process_initiate_response reads:

        _helpers.require_status_code(
            response,
            (http_client.OK,),
            self._get_status_code,
            callback=self._make_invalid,
        )

However, initiating an upload against https://storage.googleapis.com yields a 201 Created response, so it fails to comply.

Fixing this is as simple as adding http_client.CREATED to line 455:

(http_client.OK, http_client.CREATED),

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/google-resumable-media-python API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions