Ji-Xinyou commented on code in PR #2200:
URL: 
https://github.com/apache/incubator-opendal/pull/2200#discussion_r1183950438


##########
core/src/services/supabase/backend.rs:
##########
@@ -259,16 +286,38 @@ impl Accessor for SupabaseBackend {
             return Ok(RpStat::new(Metadata::new(EntryMode::DIR)));
         }
 
-        let resp = self.core.supabase_get_object_info(path).await?;
+        // The get_object_info does not contain the file size. Therefore

Review Comment:
   > Ok, we don't need to call `supabase_get_object_info` for error response, 
just transform error from http status code is enough. We will contact with 
supabase team for better solutions.
   > 
   > storage-api has a special `head` render for this: 
https://github.com/supabase/storage-api/blob/1794d04ab0e7259d9058293e257f442015252ec3/src/storage/renderer/head.ts#L6-L23
   > 
   > More like a bug...
   
   AFAIK, supabase always return error 400 on all failures, and the actual 
status_code is in the body...
   Like this
   ```text
   Parts { status: 400, version: HTTP/1.1, headers: {"content-type": 
"application/json; charset=utf-8", "content-length": "69", "connection": 
"keep-alive", "date": "Wed, 03 May 2023 16:45:27 GMT", 
"access-control-allow-origin": "*", "x-kong-upstream-latency": "41", 
"x-kong-proxy-latency": "5", "via": "kong/2.8.1"} }
   
   b"{\"statusCode\":\"404\",\"error\":\"not_found\",\"message\":\"Object not 
found\"}"
   ```



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