mirror of
https://github.com/readest/readest
synced 2026-04-21 13:37:44 +00:00
fix(kosync): CWA sometimes sends 400 for auth failure (#3893)
Some checks failed
PR checks / build_tauri_app (push) Has been cancelled
Deploy to vercel on merge / build_and_deploy (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL Advanced / Analyze (rust) (push) Has been cancelled
PR checks / rust_lint (push) Has been cancelled
PR checks / build_web_app (push) Has been cancelled
Some checks failed
PR checks / build_tauri_app (push) Has been cancelled
Deploy to vercel on merge / build_and_deploy (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL Advanced / Analyze (rust) (push) Has been cancelled
PR checks / rust_lint (push) Has been cancelled
PR checks / build_web_app (push) Has been cancelled
This commit is contained in:
parent
b223ccaee9
commit
e8f6db96e4
1 changed files with 2 additions and 1 deletions
|
|
@ -95,7 +95,8 @@ export class KOSyncClient {
|
|||
};
|
||||
|
||||
let response = await attempt();
|
||||
if (response.status === 401) {
|
||||
// some versions of CWA return status code 400 for auth failure, so check for both.
|
||||
if (response.status === 401 || response.status === 400) {
|
||||
// traditional auth failed; attempt one more time with HTTP auth
|
||||
this.usesHttpAuth = true;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue