Skip to content

Commit

Permalink
Improve error logging for olm session creation failure
Browse files Browse the repository at this point in the history
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.

Reviewers: tomek, ashoat

Reviewed By: tomek, ashoat

Differential Revision: https://phab.comm.dev/D8614
  • Loading branch information
marcinwasowicz committed Jul 28, 2023
1 parent 7ba6965 commit fa412e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keyserver/src/creators/olm-session-creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ async function createOlmSession(
callback,
);
} catch (e) {
console.warn(
`failed to create olm session of type: ${olmSessionType} ` +
`for user with cookie id: ${cookieID}`,
e,
);
throw new ServerError('olm_session_creation_failure');
}
Expand Down

0 comments on commit fa412e6

Please sign in to comment.