amunra opened a new issue, #4108:
URL: https://github.com/apache/opendal/issues/4108

   This took me _a while_ to hunt down.
   
   We ended up mis-configuring our `access_key` param for azure blob and this 
was the error:
   
   ```
   Unexpected (persistent) at stat, context: { called: reqsign::Sign, service: 
azblob, path: index.msgpack } => signing http request, source: base64 decode 
failed for InvalidByte(85, 61): base64 decode failed for InvalidByte(85, 61)
   ```
   
   I've traced this back to the `pub async fn sign<T>(&self, req: &mut 
Request<T>) -> Result<()> {` function in `core/src/services/azblob/core.rs`.
   
   The error I'd expect is something like:
   ```
   bad `access_key` configured, could not decode as base-64
   ```
   
   Ideally I would be helpful to report the error sooner, say in:
   
   ```
   impl Builder for AzblobBuilder {
       fn build(&mut self) -> Result<Self::Accessor> {
   ```
   
   Related... I've also noticed separately that building the operator from a 
map can panic if the map doesn't contain the right keys (e.g. if `container` is 
missing).
   
   This is because of this code:
   ```
       fn from_map(map: HashMap<String, String>) -> Self {
           let config = AzblobConfig::deserialize(ConfigDeserializer::new(map))
               .expect("config deserialize must **succeed");**
   ```
   
   These issues would be a small PR to raise, but I appreciate that with so 
many service implementations there's probably a "proper" way of doing this in 
the context of "opendal".


-- 
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