export class NotificationClientError extends Error {
  readonly code: string
  constructor(message: string, code = 'NOTIFICATION_CLIENT_ERROR') {
    super(message)
    this.name = 'NotificationClientError'
    this.code = code
  }
}

export function isNotificationClientError(e: unknown): e is NotificationClientError {
  return typeof e === 'object' && e !== null && (e as { name?: string }).name === 'NotificationClientError'
}
