Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: propagate errors happening in eachPage callback #283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antoineol
Copy link

@antoineol antoineol commented Sep 30, 2021

It happens that an error is thrown within the callback function passed to table.select(...).eachPage(XXX). The previous code only recognizes network errors, With this change, errors thrown by the JS code will propagate, instead of having an obscure error:

Unhandled rejection
TypeError: Cannot read property 'offset' of undefined
[1]     at /home/ubuntu/em-projects/em-monorepo/airtable-babel-synchronisation/node_modules/airtable/lib/query.js:119:28
...

I don't know how to update the unit tests to maintain the 100% coverage. I'd be grateful if you could take the test update or advise on where/how this change should be tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant