This commit is contained in:
2025-12-11 13:50:38 +01:00
parent e4c1be628d
commit c7e5de40d6
212 changed files with 2965 additions and 763 deletions

View File

@@ -1,8 +1,19 @@
export class NotificationDomainError extends Error {
readonly name: string = 'NotificationDomainError';
import type { IDomainError, CommonDomainErrorKind } from '@gridpilot/shared/errors';
constructor(message: string) {
/**
* Domain Error: NotificationDomainError
*
* Implements the shared IDomainError contract for notification domain failures.
*/
export class NotificationDomainError extends Error implements IDomainError<CommonDomainErrorKind> {
readonly name = 'NotificationDomainError';
readonly type = 'domain' as const;
readonly context = 'notifications';
readonly kind: CommonDomainErrorKind;
constructor(message: string, kind: CommonDomainErrorKind = 'validation') {
super(message);
this.kind = kind;
Object.setPrototypeOf(this, new.target.prototype);
}
}