Skip to content

Commit 3edeff9

Browse files
authored
fix(hooks): ignore 403 errors in list-only mode (#542)
1 parent 06681dc commit 3edeff9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/hooks/usePath.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,13 @@ export const usePath = () => {
182182
ObjStore.setDirectUploadTools(data.direct_upload_tools)
183183
shouldKeepState() || ObjStore.setState(State.Folder)
184184
},
185-
handleErr,
185+
onlyList
186+
? (msg: string, code?: number) => {
187+
if (code !== 403) {
188+
handleErr(msg, code)
189+
}
190+
}
191+
: handleErr,
186192
)
187193
}
188194

0 commit comments

Comments
 (0)