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

Log real errors and not just their messages, traces are useful #2464

Merged
merged 1 commit into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/crypto/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3284,7 +3284,7 @@ export class Crypto extends TypedEventEmitter<CryptoEvent, CryptoEventHandlerMap
event.on(MatrixEventEvent.Status, statusListener);
});
} catch (err) {
logger.error("error while waiting for the verification event to be sent: " + err.message);
logger.error("error while waiting for the verification event to be sent: ", err);
return;
} finally {
event.removeListener(MatrixEventEvent.LocalEventIdReplaced, eventIdListener);
Expand All @@ -3308,7 +3308,7 @@ export class Crypto extends TypedEventEmitter<CryptoEvent, CryptoEventHandlerMap
try {
await request.channel.handleEvent(event, request, isLiveEvent);
} catch (err) {
logger.error("error while handling verification event: " + err.message);
logger.error("error while handling verification event", err);
}
const shouldEmit = isNewRequest &&
!request.initiatedByMe &&
Expand Down
3 changes: 1 addition & 2 deletions src/store/indexeddb-store-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ export class IndexedDBStoreWorker {
result: ret,
});
}, (err) => {
logger.error("Error running command: " + msg.command);
logger.error(err);
logger.error("Error running command: " + msg.command, err);
this.postMessage.call(null, {
command: 'cmd_fail',
seq: msg.seq,
Expand Down