Skip to content

Surface non-2xx statuses from object put() and copy() - #258

Open
gaul wants to merge 1 commit into
openstack4j:mainfrom
gaul:feat/object-put-throw-on-error
Open

gaul wants to merge 1 commit into
openstack4j:mainfrom
gaul:feat/object-put-throw-on-error

Conversation

@gaul

@gaul gaul commented Jun 29, 2026

Copy link
Copy Markdown

PR description

ObjectStorageObjectServiceImpl.put() and copy() read the ETag off the response but never checked its status, so an error -- a missing container (404), an ETag mismatch (422) and so on -- was silently returned as a null ETag instead of raising. Throw a ResponseException on a 4xx/5xx status so callers can detect and translate the failure.

Submitter checklist

Make sure that following is addressed to make the PR easier to process:

  • If applicable, changes are covered by either a unit or a functional test.
  • If applicable, changes ware verified manually against an OpenStack instance.
  • If the change is API related, the PR description links to OpenStack API documentation of that particular endpoint/request (https://docs.openstack.org/api-quick-start/#current-api-versions).
  • If the change concerns particular OpenStack service, its name is used as a PR name prefix (ex.: "Neutron: Add floatingIp port forwardings service").
  • If the PR closes existing GitHub issue, PR name have prefix: Fix #NNN: .

ObjectStorageObjectServiceImpl.put() and copy() read the ETag off the response
but never checked its status, so an error -- a missing container (404), an ETag
mismatch (422) and so on -- was silently returned as a null ETag instead of
raising.  Throw a ResponseException on a 4xx/5xx status so callers can detect
and translate the failure.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant