/**
 * CarrierUnavailableException
 *
 * Thrown when a carrier is unavailable or not responding
 */

export class CarrierUnavailableException extends Error {
  constructor(
    public readonly carrierName: string,
    public readonly reason?: string
  ) {
    super(`Carrier ${carrierName} is unavailable${reason ? `: ${reason}` : ''}`);
    this.name = 'CarrierUnavailableException';
    Object.setPrototypeOf(this, CarrierUnavailableException.prototype);
  }
}
