Xuanwo commented on code in PR #2203:
URL:
https://github.com/apache/incubator-opendal/pull/2203#discussion_r1186997678
##########
core/src/services/gdrive/core.rs:
##########
@@ -105,27 +100,21 @@ impl GdriveCore {
if i != file_path_items.len() - 1 {
query += "and mimeType = 'application/vnd.google-apps.folder'";
}
- let query: String = query.chars().filter(|c|
!c.is_whitespace()).collect();
let req = self
.sign(Request::get(format!(
"https://www.googleapis.com/drive/v3/files?q={}",
- query
+ percent_encode_path(&query)
)))
.body(AsyncBody::default())
.map_err(new_request_build_error)?;
let resp = self.client.send(req).await?;
- let resp_body = &resp.into_body().bytes().await.map_err(|e| {
- Error::new(ErrorKind::Unexpected, "read response body error")
- .with_context("service", Scheme::Gdrive)
- .set_source(e)
- })?;
+ let resp_body = &resp.into_body().bytes().await?;
Review Comment:
We need to check the returning status code first.
--
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]