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

Error logging/handling: make sync errors visible #42

Open
jcaesar opened this issue Feb 16, 2019 · 1 comment
Open

Error logging/handling: make sync errors visible #42

jcaesar opened this issue Feb 16, 2019 · 1 comment

Comments

@jcaesar
Copy link

jcaesar commented Feb 16, 2019

If the matrix client fails its sync (for example with an M_UNKNOWN_TOKEN because of a configuration error) there will be no output at all, just a stale promise.
The critical place should be in startClient.

This should be really simple (give some log output + fail the promise), but since I know near-nothing about nodejs, I don't dare make a PR.

@kfatehi
Copy link
Member

kfatehi commented Feb 16, 2019

Right, I remember writing this too fast & loose... I don't have a synapse instance stood up for testing at this time, but let me see if I can contribute to the critical path:

According to https://github.com/matrix-org/matrix-js-sdk/blob/ae85c209ab0d58c900bc3db1802cffc1be880b85/spec/integ/matrix-client-event-emitter.spec.js#L304 the matrix client will emit Session.logged_out in in the case of M_UNKNOWN_TOKEN so that may be a good place to reject() if we have not already resolve()d.

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

No branches or pull requests

2 participants