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

Add await when processing header to avoid unhandleRejection #698

Conversation

deanhannigan
Copy link
Contributor

There was an await missing in the call to the _processHeaderRow function that would cause an unhandledRejection error when any error was encountered. The side effect of this is that the unhandledRejection error goes under the radar and results in a uncaughtException error that kills the Budibase server.

To reproduce

  • Create a Google sheet. Ensure at least one of more of the sheets have no headers.
  • Add the sheet to your datasources in Budibase.
  • Click Fetch tables for Google sheet. Select all the sheets.
  • Click Fetch Sheets. The import will fail and the server will crash with an unhandledRejection

Our koa app also needs a modification to better handle the unhandledRejection

mike12345567 added a commit to Budibase/node-google-spreadsheet that referenced this pull request Aug 5, 2024
Add await when processing header to avoid unhandleRejection theoephraim#698
@mike12345567 mike12345567 deleted the fix/add-await-when-processing-header branch August 5, 2024 15:19
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.

2 participants