network_in_use
HTTP 409 The network is still in use by servers or router rules
What happened
Servers are still attached to this network, and you asked to delete it or to change its subnet to one that does not contain the current subnet - a narrower one or one moved elsewhere. Either would cut those servers off; widening the subnet to a range that contains the current one is accepted, and the detail of this refusal names the current range. A server that is still being created in the network counts too, and so does a network interface that a task is still attaching to it and a server in it that is being reinstalled: deleting the network then answers this code with Retry-After, and the detail names the server (and the task). A server in an error state that still keeps its interfaces in this network for a reinstall holds the network as well - the reinstall brings those interfaces back - and this answer carries no Retry-After: reinstall or delete that server first. Detaching a router from the network answers the same while the router's access rules or port forwards still use the network: the router gives the freed interface number to the next network it joins, and those rules would silently apply there.
What to do
To change the subnet, send a range that contains the current one, for example 10.8.8.0/22 for 10.8.8.0/24. Otherwise detach the servers first - move their interfaces to another network, or delete the servers - and then repeat the same request. When the response carries Retry-After, a server is being created or reinstalled in the network or an interface is being attached to it: wait for that task to finish, then decide - the network now has that server attached. When detaching a router, the detail names the access rules and port forwards that hold the network and its interface (for example access rules 2000, 2010 and port forward 2000 on eth2): delete them or move them off that interface, then repeat.
Retrying
Change the state this refers to, then repeat the same request with the same idempotency key.
How it arrives
{
"type": "https://docs.fiberax.com/errors/network_in_use",
"title": "The network is still in use by servers or router rules",
"status": 409,
"code": "network_in_use",
"request_id": "a277dcd1ca652c65"
}
Branch your code on code, never on the wording of title.