We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 31dcb1f + 9bce0e8 commit 36d2875Copy full SHA for 36d2875
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