From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox] s3-client: don't discriminate 403 status code for get objcet response
Date: Wed, 6 Aug 2025 17:11:21 +0200 [thread overview]
Message-ID: <20250806151121.595311-1-c.ebner@proxmox.com> (raw)
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@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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2025-08-06 15:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 15:11 Christian Ebner [this message]
2025-08-06 17:22 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250806151121.595311-1-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox