-
Notifications
You must be signed in to change notification settings - Fork 148
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: Type correction on renaming file api #488
Conversation
@@ -165,15 +164,18 @@ async def request( | |||
try: | |||
error_data = await client_resp.json() | |||
raise VFolderOperationFailed( | |||
extra_msg=error_data.pop("msg"), |
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.
👍🏼 Good catch!
@@ -485,7 +485,7 @@ async def rename_file(request: web.Request) -> web.Response: | |||
t.Key("vfid"): tx.UUID(), | |||
t.Key("relpath"): tx.PurePath(relative_only=True), | |||
t.Key("new_name"): t.String(), | |||
t.Key("is_dir"): t.ToBool(), # ignored since 22.03 |
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.
You don't have to remove parenthesis of t.ToBool()
because Trafaret automatically handles the difference of type reference and instance reference when there is no argument of a trafaret class.
* fix: Set default value for `is_dir` param in renaming file function * fix: Add exception handling on storage related request on manager component Backported-From: main (22.06) Backported-To: 22.03
Description
This PR resolves two things; setting the default value for
is_dir
parameter in the rename_file function, and providing more precise message in exception handling when virtual folder operation errors occurred on the same function.I confirmed this issue during E2E testing for #443.
Screenshot(s)