@autobe/agent
Version:
AI backend server code generator
39 lines • 1.34 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutoBeTimeoutError = void 0;
/**
* Custom error indicating LLM conversation exceeded configured timeout limit.
*
* Used by `TimedConversation` to wrap conversation operations with timeout
* enforcement. When LLM response takes too long, this error is thrown to
* distinguish timeout failures from other error types.
*
* The distinction is critical for retry logic: timeout errors are NOT retried
* (immediate failure) while other errors can be retried. This prevents wasting
* resources on conversations that are fundamentally too slow.
*
* @author Samchon
*/
class AutoBeTimeoutError extends Error {
/**
* Creates timeout error with descriptive message.
*
* @param message Error description including timeout duration
*/
constructor(message) {
super(message);
const proto = new.target.prototype;
if (Object.setPrototypeOf)
Object.setPrototypeOf(this, proto);
else {
// biome-ignore lint: intended
this.__proto__ = proto;
}
}
/** Returns error class name for identification. */
get name() {
return this.constructor.name;
}
}
exports.AutoBeTimeoutError = AutoBeTimeoutError;
//# sourceMappingURL=AutoBeTimeoutError.js.map