MCPcopy Create free account
hub / github.com/braintrustdata/bash-agent-evals / TimeoutError

Class TimeoutError

src/agents/bash-agent.ts:54–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54class TimeoutError extends Error {
55 constructor(command: string, timeoutMs: number) {
56 super(
57 `Command timed out after ${timeoutMs / 1000}s: ${command.slice(0, 100)}${command.length > 100 ? '...' : ''}`,
58 );
59 this.name = 'TimeoutError';
60 }
61}
62
63// Wrapper that adds timeout to bash commands
64function withTimeout<T>(promise: Promise<T>, timeoutMs: number, command: string): Promise<T> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected