Skip to content

Commit 37a7e9c

Browse files
committed
chore: log on error
1 parent 86f4b88 commit 37a7e9c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/common/connectionManager.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,19 +277,25 @@ export class ConnectionManager extends EventEmitter<ConnectionManagerEvents> {
277277

278278
private async pingAndForget(serviceProvider: NodeDriverServiceProvider): Promise<void> {
279279
try {
280-
await serviceProvider?.runCommand?.("admin", { hello: 1 }).catch(() => {});
280+
await serviceProvider?.runCommand?.("admin", { hello: 1 });
281281
} catch (error: unknown) {
282-
// we really don't care about this error
283-
void error;
282+
this.logger.warning({
283+
id: LogId.oidcFlow,
284+
context: "pingAndForget",
285+
message: String(error),
286+
});
284287
}
285288
}
286289

287290
private async disconnectOnOidcError(error: unknown): Promise<void> {
288291
try {
289292
await this.disconnect();
290293
} catch (error: unknown) {
291-
// we really don't care about this error
292-
void error;
294+
this.logger.warning({
295+
id: LogId.oidcFlow,
296+
context: "disconnectOnOidcError",
297+
message: String(error),
298+
});
293299
} finally {
294300
this.changeState("connection-errored", { tag: "errored", errorReason: String(error) });
295301
}

0 commit comments

Comments
 (0)