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

Class TimeoutError

src/agents/bash-sqlite-agent.ts:132–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132class TimeoutError extends Error {
133 constructor(command: string, timeoutMs: number) {
134 super(
135 `Command timed out after ${timeoutMs / 1000}s: ${command.slice(0, 100)}${command.length > 100 ? '...' : ''}`,
136 );
137 this.name = 'TimeoutError';
138 }
139}
140
141function withTimeout<T>(promise: Promise<T>, timeoutMs: number, command: string): Promise<T> {
142 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected