[pbs-devel] [PATCH proxmox] s3-client: don't discriminate 403 status code for get objcet response

Christian Ebner c.ebner at proxmox.com
Wed Aug 6 17:11:21 CEST 2025


The AWS S3 API documents status code 403 as response to get object
calls as `InvalidObjectState`, meaning that objects are archived in
a different, long term storage class and cannot be accessed until
restored from there. The s3 client response reader therefore did
explicitley check for that. This status code might however also be
returned e.g. if the user runs into limits set by free tiers as
reported in the community forum [1].

Since the currently logged error is provider specific and will hinder
finding the actual error cause, do not discriminate this further from
other unexpected status codes but rather treat it as such, also
logging the response body.

[0] https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html#API_GetObject_Errors
[1] https://forum.proxmox.com/threads/168834/post-788928

Reported-by: https://forum.proxmox.com/threads/168834/post-788928
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 proxmox-s3-client/src/response_reader.rs | 1 -
 1 file changed, 1 deletion(-)

diff --git a/proxmox-s3-client/src/response_reader.rs b/proxmox-s3-client/src/response_reader.rs
index f895db19..bfd71205 100644
--- a/proxmox-s3-client/src/response_reader.rs
+++ b/proxmox-s3-client/src/response_reader.rs
@@ -325,7 +325,6 @@ impl ResponseReader {
         match parts.status {
             StatusCode::OK => (),
             StatusCode::NOT_FOUND => return Ok(None),
-            StatusCode::FORBIDDEN => bail!("object is archived and inaccessible until restored"),
             status_code => {
                 let body = content.collect().await?.to_bytes();
                 Self::log_error_response_utf8(body);
-- 
2.47.2





More information about the pbs-devel mailing list