mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(web): auth bad login flash (#820)
[DEV-820] bugfix: since it's 401 we should reject the promise that way onError actually works. I think this was causing login to succeed for like a second then goes back to login but with this we reject it early shouldn't pass the login screen. Co-authored-by: KaiserBh <kaiserbh@proton.me>
This commit is contained in:
parent
2534186b5f
commit
d48e94ff33
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ export async function HttpClient<T>(
|
|||
AuthContext.reset();
|
||||
|
||||
// Show an error toast to notify the user what occurred
|
||||
return Promise.resolve(response);
|
||||
return Promise.reject(new Error("Unauthorized"));
|
||||
}
|
||||
|
||||
return Promise.reject(new Error(await response.text()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue