enzostvs HF staff commited on
Commit
63fef5b
1 Parent(s): 2f8a2c4

check the error in prod

Browse files
Files changed (1) hide show
  1. 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) return
 
 
 
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()