export const UnexpectedError = class UnexpectedError extends Error { code; status; errors; constructor( status: number, code: string, message: string | undefined, errors?, ) { super(message); this.status = status; this.code = code; this.errors = errors || []; } static DbError(errors) { return new UnexpectedError( 500, "dbError", "Ошибка базы данных", errors || [], ); } };