authClient.getSession never throws

authClient.getSession appears to never throw no matter the settings. I tried:
export const authClient = createAuthClient({
  baseURL: envConfig.VITE_BETTER_AUTH_URL,
  fetchOptions: {
    throw: true,
  },
});

authClient.getSession({}, { throw: true })


authClient.getSession({ fetchOptions: { throw: true } })

authClient.getSession({ fetchOptions: { throw: true } }, { throw: true })


and it always returns null instead of throwing on error 401 like other methods do, like signIn throws an error 401 if i enter wrong pass/email etc
Was this page helpful?