Skip to content

Log full errors when Gitter <-> Matrix invite warnings are triggered

Log full errors when Gitter <-> Matrix invite warnings are triggered

Found while working on #2783 (closed)

Before

2021-06-11T07:05:10.795Z - warn: Unable to invite Matrix user (@root:my.matrix.host) back to Matrix DM room matrixRoomId=!szXGVavjatfvWUnfDG:my.matrix.host gitterRoomId=607f4fe2f691c440ada9315e

After

2021-06-11T07:33:08.695Z - warn: Unable to invite Matrix user (@root:my.matrix.host) back to Matrix DM room matrixRoomId=!szXGVavjatfvWUnfDG:my.matrix.host gitterRoomId=607f4fe2f691c440ada9315e
{
  exception: {
    message: 'Failed to join room',
    stack: 'Error: Failed to join room\n' +
      '    at Intent._ensureJoined (C:\\Users\\MLM\\Documents\\GitLab\\webapp\\node_modules\\@gitterhq\\matrix-appservice-bridge\\lib\\components\\intent.js:786:60)\n' +
      '    at runMicrotasks (<anonymous>)\n' +
      '    at processTicksAndRejections (internal/process/task_queues.js:93:5)\n' +
      '    at async Intent.getStateEvent (C:\\Users\\MLM\\Documents\\GitLab\\webapp\\node_modules\\@gitterhq\\matrix-appservice-bridge\\lib\\components\\intent.js:593:9)\n' +
      '    at async GitterBridge.inviteMatrixUserToDmRoomIfNeeded (C:\\Users\\MLM\\Documents\\GitLab\\webapp\\modules\\matrix-bridge\\lib\\gitter-bridge.js:125:29)\n' +
      '    at async GitterBridge.handleChatMessageCreateEvent (C:\\Users\\MLM\\Documents\\GitLab\\webapp\\modules\\matrix-bridge\\lib\\gitter-bridge.js:201:7)\n' +
      '    at async GitterBridge.onDataChange (C:\\Users\\MLM\\Documents\\GitLab\\webapp\\modules\\matrix-bridge\\lib\\gitter-bridge.js:56:11)',
    name: 'Error'
  }
}
Edited by Eric Eastwood

Merge request reports