Exception: Axn::Webhooks::InvalidTarget

Inherits:
Error
  • Object
show all
Defined in:
lib/axn/webhooks/errors.rb

Overview

Raised by Outbound::TargetPolicy when a resolved subscriber row (a static to: entry OR a runtime subscribers/to: lambda's return value) fails shape/host validation — a non-String URL, a non-http(s) scheme, a missing host, an unknown Hash key, or a host the declared allowed_hosts/allow_url policy rejects. A RUNTIME condition (a DB-backed store can produce a bad row at any time, not just at boot), so it's Axn::Webhooks::Error-rooted rather than the plain ArgumentError a pure outbound block declaration mistake raises — see the error-class split documented above Outbound::Config#validate_event!. Config#resolve_targets rescues this per-row so one malformed subscriber can't discard the rest of a fan-out.