Fixes issue https://github.com/twentyhq/twenty/issues/6731 **Problem:** After access token token expires, scrolling down the `RecordTable` component will put it to an infinite loop of trying to fetch records and printing errors on every iteration. **Solution:** Disable fetching until component remount if a `FORBIDDEN` error is encountered. --------- Co-authored-by: ad-elias <elias@autodiligence.com>
This commit is contained in:
@ -188,6 +188,7 @@ export const useFetchMoreRecordsWithPagination = <
|
||||
};
|
||||
} catch (error) {
|
||||
handleFindManyRecordsError(error as ApolloError);
|
||||
return { error: error as ApolloError };
|
||||
} finally {
|
||||
setIsFetchingMoreObjects(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user