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: report errors from automigrate/autoupdate (defer automigrate/autoupdate until we are connected) #1756

Merged
merged 1 commit into from
Jul 4, 2019

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Jul 2, 2019

Defer automigrate/autoupdate until we are connected, so that connection errors can be reported back to callers.

Fix postInit handler to not report connection error to console.log and via dataSource "error" event in case there is already an operation queued. When this happens, we want the error to be handled by the queued operation and reported to its caller.

Related issues

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

lib/datasource.js Outdated Show resolved Hide resolved
Copy link
Contributor

@hacksparrow hacksparrow left a comment

Choose a reason for hiding this comment

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

LGTM except for that typo

@bajtos bajtos force-pushed the fix/migrate-errors branch 2 times, most recently from 016dd58 to dea001f Compare July 2, 2019 11:19
Copy link
Contributor

@b-admike b-admike left a comment

Choose a reason for hiding this comment

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

Nice. One comment, otherwise LGTM.

test/datasource.test.js Outdated Show resolved Hide resolved
Defer automigrate/autoupdate until we are connected, so that connection
errors can be reported back to callers.

Fix postInit handler to not report connection error to console.log
and via dataSource "error" event in case there is already an operation
queued. When this happens, we want the error to be handled by the
queued operation and reported to its caller.

Signed-off-by: Miroslav Bajtoš <[email protected]>
@bajtos bajtos force-pushed the fix/migrate-errors branch from dea001f to 40286fc Compare July 4, 2019 10:37
@bajtos
Copy link
Member Author

bajtos commented Jul 4, 2019

@slnode test please

@bajtos bajtos merged commit 0c2bb81 into master Jul 4, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/migrate-errors branch July 4, 2019 11:51
@bajtos bajtos changed the title fix: report errors from automigrate/autoupdate fix: report errors from automigrate/autoupdate (defer automigrate/autoupdate until we are connected) Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration error does not get caught
3 participants