School Girl Sashimi
This commit is contained in:
parent
5d8ac7a7e2
commit
4f57e42d26
1 changed files with 10 additions and 6 deletions
16
js/HiFi.ts
16
js/HiFi.ts
|
|
@ -1340,12 +1340,16 @@ class HiFiClient {
|
|||
force: unauthorized,
|
||||
});
|
||||
|
||||
res = await fetch(final, {
|
||||
headers: {
|
||||
authorization: `Bearer ${token}`,
|
||||
},
|
||||
signal,
|
||||
});
|
||||
try {
|
||||
res = await fetch(final, {
|
||||
headers: {
|
||||
authorization: `Bearer ${token}`,
|
||||
},
|
||||
signal,
|
||||
});
|
||||
} catch (err: unknown) {
|
||||
throw new ResponseError(0, err instanceof Error ? err.message : String(err));
|
||||
}
|
||||
|
||||
if (previousResponse && unauthorized && res.status === 401) {
|
||||
throw new ResponseError(401, 'Unauthorized: Invalid or expired token');
|
||||
|
|
|
|||
Loading…
Reference in a new issue