Skip to content

Commit 36d2875

Browse files
committed
Merge branch 'main' into feat/5-min-trip-timer
2 parents 31dcb1f + 9bce0e8 commit 36d2875

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/tokenRefresh.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ async function tokenRefresh() {
2929
body: JSON.stringify({
3030
token: user.refreshToken,
3131
}),
32-
});
32+
// In case of an internal server error, CORS aren't sent, thus fetch fails
33+
}).catch(() => null);
3334

34-
if (response.status === 200) {
35+
if (response?.ok) {
3536
const responseObject = await response.json();
3637

3738
if (Object.hasOwn(responseObject, "data")) {

0 commit comments

Comments
 (0)