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
Unknown Object (File)
Wed, Jul 3, 12:10 PM
Unknown Object (File)
Fri, Jun 28, 6:35 PM
Unknown Object (File)
Fri, Jun 14, 2:41 AM
Unknown Object (File)
Thu, Jun 13, 7:32 AM
Unknown Object (File)
Mon, Jun 10, 7:24 PM
Unknown Object (File)
Apr 4 2024, 8:11 PM
Unknown Object (File)
Apr 4 2024, 8:11 PM
Unknown Object (File)
Apr 4 2024, 8:11 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #29057)

Missing a space at the end

Add missing space. Rebase before landing