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 #2

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

deanhannigan
Copy link

@deanhannigan deanhannigan commented Aug 5, 2024

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

Copy link

@mike12345567 mike12345567 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice find!

@mike12345567 mike12345567 merged commit 17e5300 into main Aug 5, 2024
@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