Page MenuHomePhabricator

Improve error logging for olm session creation failure
ClosedPublic

Authored by marcin on Jul 25 2023, 3:12 AM.
Tags
None
Referenced Files
F2894123: D8614.diff
Fri, Oct 4, 2:41 PM
Unknown Object (File)
Wed, Oct 2, 7:10 PM
Unknown Object (File)
Fri, Sep 20, 1:55 AM
Unknown Object (File)
Fri, Sep 20, 1:55 AM
Unknown Object (File)
Fri, Sep 20, 1:55 AM
Unknown Object (File)
Fri, Sep 20, 1:55 AM
Unknown Object (File)
Fri, Sep 20, 1:55 AM
Unknown Object (File)
Tue, Sep 10, 6:30 AM
Subscribers
None

Details

Summary

This differential is created in response to the following linear issue: https://linear.app/comm/issue/ENG-4451/improve-logging-for-olm-session-creation-failure. Olm session creation failure is a seriious concern and current error handling does
not provide meaningful information for debugging purposes.

Test Plan

Delete olm sessions table from the database. Try to log in from mobile app. Ensure that meaningful logs are printed to the console.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-4453
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 25 2023, 4:33 AM
Harbormaster failed remote builds in B21177: Diff 29010!
tomek added inline comments.
keyserver/src/creators/olm-session-creator.js
27 ↗(On Diff #29010)

We probably shouldn't log cookieID

This revision is now accepted and ready to land.Jul 25 2023, 6:17 AM
keyserver/src/creators/olm-session-creator.js
27 ↗(On Diff #29010)

Knowing the cookieID for which the failure occurred might be helpful for debugging purposes. Does it create security issues?

keyserver/src/creators/olm-session-creator.js
27 ↗(On Diff #29010)
  1. Can you please keep all lines to a max of 80 chars?
  2. I think it's okay to log the cookie ID on the keyserver. Presumably the keyserver owner has access to this information anyways via MariaDB
  3. I wonder if relying on Node to render the exception might be better than getMessageForException, eg. console.warn('message', e)
ashoat added inline comments.
keyserver/src/creators/olm-session-creator.js
27

Missing a space at the end

Add missing space. Rebase before landing