webhook_endpoint.url_invalid
The URL is not an absolute https URL on an allowed port (443 by default) with a DNS host name: no user information, fragment, IP literal, localhost, single-label name or .local, .localhost, .internal, .arpa suffix, at most 1,000 characters, and never a platform host or a partner domain served by the platform. In Development and Testing only, a URL on an exact origin of OutboundWebhooks:DevelopmentAllowedOrigins (https://host:port, for example the fakes' receiver of journey J30) skips the host, port, platform-host and address rules; https, user information, fragment and length are still checked.
| Code | webhook_endpoint.url_invalid |
|---|---|
| HTTP status | 422 |
| Category | Unprocessable |
| Arguments | reason (NotHttps, Credentials, Fragment, Port, IpLiteral, SingleLabel, ReservedSuffix, TooLong, PlatformHost) |
What the portals show
The portals translate the code, never the title. The English (en-GB) message, in ICU format with the arguments as placeholders:
This URL cannot receive webhooks{reason, select, NotHttps {: it must start with https://} Credentials {: it must not contain a user name or password} Fragment {: it must not contain a #} IpLiteral {: use a host name, not an IP address} SingleLabel {: use a full host name} ReservedSuffix {: this host name is reserved} Port {: this port is not allowed} TooLong {: it is too long} PlatformHost {: it points at this platform} other {}}.
Example response
{
"type": "https://docs.test.konsolutelab.uk/errors/webhook_endpoint.url_invalid",
"title": "…",
"status": 422,
"code": "webhook_endpoint.url_invalid",
"args": {},
"traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
"instance": "/api/v1/…"
}Handling it
Branch on code, not on title or the status alone, and log traceId. Codes are stable; new codes may appear, so fall back on the HTTP status for a code you do not know. See Handling errors and the list of codes.