Accessing pageSize value

I am trying to read an Airtable database containing over 500 records. so far all is good but i get an error when parsing the last page (which contains only 22 records) -

to resolve this i need to access the pageSize value, as, from the documentation, it seems to indicate the number of records returned. I can’t seem to find code sample on how to do this though. would anyone have sample code to do this? (i am coding in Google App Scripts )

Thanks in advance