public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox] s3-client: don't discriminate 403 status code for get objcet response
@ 2025-08-06 15:11 Christian Ebner
  2025-08-06 17:22 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2025-08-06 15:11 UTC (permalink / raw)
  To: pbs-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox] s3-client: don't discriminate 403 status code for get objcet response
  2025-08-06 15:11 [pbs-devel] [PATCH proxmox] s3-client: don't discriminate 403 status code for get objcet response Christian Ebner
@ 2025-08-06 17:22 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-08-06 17:22 UTC (permalink / raw)
  To: pbs-devel, Christian Ebner

On Wed, 06 Aug 2025 17:11:21 +0200, Christian Ebner wrote:
> 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].
> 
> [...]

Applied, thanks!

[1/1] s3-client: don't discriminate 403 status code for get objcet response
      commit: 2502c5695f51ea62de53d9bdc9f9d43a0f94f025


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-06 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-06 15:11 [pbs-devel] [PATCH proxmox] s3-client: don't discriminate 403 status code for get objcet response Christian Ebner
2025-08-06 17:22 ` [pbs-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal