invalid_cidr
HTTP 422 Subnet is invalid
What happened
The subnet you sent is not a usable network address. It must be IPv4 in CIDR notation with a prefix between /8 and /30, and it must be the network address itself, with no host bits set. It also must not overlap 172.16.0.0/16 or 172.17.0.0/16 - neither lie inside them nor contain them, as 172.16.0.0/12 does: these ranges are reserved for the VPN tunnels of routers (WireGuard and OpenVPN), and the detail field then names the range the subnet hit. A new network or a new range must also lie wholly inside a private range (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 - a public range such as 8.8.8.0/24 would hide the real addresses of that range from your servers, the networks behind the same router and your VPN devices; the detail field then names the three ranges. A network whose stored range lies outside them keeps it: renaming the network, or sending its current range unchanged, is not refused for that reason.
What to do
Send the network address of the range, for example 10.0.0.0/24 rather than 10.0.0.5/24. If you hold a host address, clear the host bits before sending it. If the subnet overlaps a reserved VPN range, choose one clear of both 172.16.0.0/16 and 172.17.0.0/16, for example 10.20.0.0/24, 192.168.50.0/24 or 172.20.0.0/16. If the subnet lies outside the private ranges, pick one inside 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16.
Retrying
Fix the request and send it again.
How it arrives
{
"type": "https://docs.fiberax.com/errors/invalid_cidr",
"title": "Subnet is invalid",
"status": 422,
"code": "invalid_cidr",
"request_id": "a277dcd1ca652c65"
}
Branch your code on code, never on the wording of title.