emcake opened a new issue, #107:
URL: https://github.com/apache/arrow-rs-object-store/issues/107

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   Currently `object_store` implements `copy_if_not_exists` behaviour for S3 
object stores that can specify how to do this via a header. Currently 
Cloudflare R2 does this with support from the `COPY_IF_NOT_EXISTS` env variable 
configured to append a header and matching on `PRECONDITION_FAILED` return 
status code.
   
   I have another S3 implementation that can implement something like this via 
a header, but the return status code is 403 (`FORBIDDEN`) instead.
   
   **Describe the solution you'd like**
   Extend the match case on error when copying to include 403 as a return code 
that indicates that the file cannot be overwritten.
   
   **Describe alternatives you've considered**
   I considered catching this later in user code and handling it, but by the 
time it reaches me it's wrapped in a `Generic` object store error with `Box<dyn 
Error>` and I can't even use `Any` to match against the inner error.
   
   **Additional context**
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to