Error codes
This page documents validation error codes returned by the Spectrum API when creating or updating Spectrum applications.
Spectrum API errors follow the standard Cloudflare v4 error envelope. The response body includes an errors array with code and message fields:
{ "errors": [ { "code": 11044, "message": "no matching routes in the specified virtual network" } ], "messages": [], "success": false, "result": null}Look up the code in the sections below for the cause and resolution.
The following codes are returned by POST /zones/:zone/spectrum/apps and PATCH /zones/:zone/spectrum/apps/:id when validating an application that uses a virtual network origin.
virtual_network_id was set on a request that uses origin_dns. Virtual network origins are only supported with IP-based origins.
Resolution: Replace origin_dns with origin_direct and provide the private IP and single port that the virtual network routes to.
origin_direct contained more than one address. Virtual network origins must resolve to a single private IP and port.
Resolution: Reduce origin_direct to a single entry of the form tcp://<ip>:<port> or udp://<ip>:<port>.
The request included a port range, either in origin_port or in the origin_direct address. Virtual network origins do not support port ranges.
Resolution: Use a single port instead of a range. If you need to expose multiple ports, create a separate Spectrum application per port.
The combination of IP and virtual_network_id does not match any route in the specified virtual network. This covers two cases: the virtual network does not exist, or the IP is not routable within the virtual network you specified.
Resolution:
- Confirm
virtual_network_idmatches a virtual network on your account. You can list virtual networks with the List virtual networks endpoint. - Confirm the origin IP is within a route attached to that virtual network. You can list routes with the List network routes endpoint.
- If no matching route exists, add one by following Connect an IP/CIDR.
virtual_network_id is not a valid UUID.
Resolution: Provide a UUID. Virtual network IDs are returned by the List virtual networks endpoint in the id field of each entry.