diff --git a/src/gateway/exec-approval-manager.ts b/src/gateway/exec-approval-manager.ts index c68f271fd..0ebd6bdcf 100644 --- a/src/gateway/exec-approval-manager.ts +++ b/src/gateway/exec-approval-manager.ts @@ -25,7 +25,7 @@ export type ExecApprovalRecord = { type PendingEntry = { record: ExecApprovalRecord; - resolve: (decision: ExecApprovalDecision) => void; + resolve: (decision: ExecApprovalDecision | null) => void; reject: (err: Error) => void; timer: ReturnType; }; @@ -45,11 +45,11 @@ export class ExecApprovalManager { return record; } - async waitForDecision(record: ExecApprovalRecord, timeoutMs: number): Promise { - return await new Promise((resolve, reject) => { + async waitForDecision(record: ExecApprovalRecord, timeoutMs: number): Promise { + return await new Promise((resolve, reject) => { const timer = setTimeout(() => { this.pending.delete(record.id); - resolve("deny"); + resolve(null); }, timeoutMs); this.pending.set(record.id, { record, resolve, reject, timer }); });