-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(services/dropbox): fix dropbox test failed #4317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
core/src/services/dropbox/core.rs
Outdated
ErrorKind::Unexpected, | ||
&format!("delete failed with error {}", error.error_summary), | ||
); | ||
let err = if let Some(error) = entry.error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit odd that dropbox returns a failure without an error. Do you know the actual response from dropbox services?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for overlooking a potential issue.
Yes, it returns an error format that the current DropboxErrorResponse
cannot parse. We should modify DropboxErrorResponse
to support the new error format.
Due to the 1password settings, I cannot completely reproduce the test in CI. The following are the results of testing using a personal account.
When an error occurs during the stat
call, Dropbox returns an error like this:
{
"error_summary": "path/not_found/",
"error": {
".tag": "path",
"path": {
".tag": "not_found"
}
}
}
When an error occurs during batch
call, Dropbox returns an error like this (causing an expect error):
{
".tag": "complete",
"entries": [
{
".tag": "failure",
"failure": {
".tag": "path_lookup",
"path_lookup": {
".tag": "not_found"
}
}
}
]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Seems we need to parse the error response from dropbox correctly.
I added When dropbox returns the following error. {
".tag": "failure",
"failure": {
".tag": "path_lookup",
"path_lookup": {
".tag": "not_found",
}
}
} OpenDAL will return such an error message. Error: Unexpected (permanent) at delete, context: { service: dropbox, path: } => delete failed with error path_lookup not_found |
Thank you for looking into this. This is precisely the situation I wanted to address: we can ignore the "not_found" error when deleting. |
I'm very sorry for deleting this PR due to my mistake. I will initiate a new PR later. |
fix: #4314