@fromsvenwithlove/devops-issues-cli
Version:
AI-powered CLI tool and library for Azure DevOps work item management with Claude agents
41 lines (37 loc) • 1.02 kB
JavaScript
export class CacheError extends Error {
constructor(message, cause) {
super(message);
this.name = 'CacheError';
this.cause = cause;
}
}
export class CacheNotFoundError extends CacheError {
constructor(path, cause) {
super(`Cache not found at ${path}`, cause);
this.name = 'CacheNotFoundError';
this.path = path;
}
}
export class CacheExpiredError extends CacheError {
constructor(ttl, age) {
super(`Cache expired (TTL: ${ttl}s, Age: ${Math.round(age)}s)`);
this.name = 'CacheExpiredError';
this.ttl = ttl;
this.age = age;
}
}
export class CacheIOError extends CacheError {
constructor(operation, path, cause) {
super(`Cache ${operation} failed for ${path}`, cause);
this.name = 'CacheIOError';
this.operation = operation;
this.path = path;
}
}
export class CacheCorruptedError extends CacheError {
constructor(path, cause) {
super(`Cache corrupted at ${path}`, cause);
this.name = 'CacheCorruptedError';
this.path = path;
}
}