We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf60ac0 commit 9bce0e8Copy full SHA for 9bce0e8
1 file changed
scripts/tokenRefresh.js
@@ -29,9 +29,10 @@ async function tokenRefresh() {
29
body: JSON.stringify({
30
token: user.refreshToken,
31
}),
32
- });
+ // In case of an internal server error, CORS aren't sent, thus fetch fails
33
+ }).catch(() => null);
34
- if (response.status === 200) {
35
+ if (response?.ok) {
36
const responseObject = await response.json();
37
38
if (Object.hasOwn(responseObject, "data")) {
0 commit comments