Spaces:
Runtime error
Runtime error
check the error in prod
Browse files- utils/useUser.ts +4 -1
utils/useUser.ts
CHANGED
@@ -62,7 +62,10 @@ export const useUser = () => {
|
|
62 |
}),
|
63 |
});
|
64 |
const res = await request.clone().json().catch(() => ({}));
|
65 |
-
if (!res.ok)
|
|
|
|
|
|
|
66 |
setValue(res.access_token, {
|
67 |
expires: new Date(
|
68 |
res.experes_in * 1000 + new Date().getTime()
|
|
|
62 |
}),
|
63 |
});
|
64 |
const res = await request.clone().json().catch(() => ({}));
|
65 |
+
if (!res.ok) {
|
66 |
+
console.log(res);
|
67 |
+
return null;
|
68 |
+
}
|
69 |
setValue(res.access_token, {
|
70 |
expires: new Date(
|
71 |
res.experes_in * 1000 + new Date().getTime()
|