Files
sf-monitorizacion-health/src/domain/common.ts

15 lines
539 B
TypeScript

export class AppError extends Error {
constructor(public message: string, public status: number = 500, public details: Record<string, unknown> = {}) {
super(message);
this.name = 'AppError';
}
}
export class RepositoryError extends AppError { constructor(msg: string, details = {}) { super(msg, 500, details); this.name = 'RepositoryError'; } }
export interface Proyecto {
id: number;
nombre: string;
url_health: string;
estado_codigo?: 'OK' | 'ERROR' | 'TIMEOUT' | 'PENDIENTE';
fecha?: Date;
}