router_field_not_supported
HTTP 422 A router image takes only a public address and one private network - the platform sets the name, the size and the credentials itself
What happened
A create request using a router image carried a field the platform sets itself: name, cores, memory_mb, disk_gb, plan_id, password, ssh_keys, ssh_public_keys, setup, accept_license, gpus, disk_type, gpu_package or host. Only a field with real content is refused: an empty value of the field's own type is ignored - an empty list in ssh_keys, ssh_public_keys or gpus, an empty object in setup, false in accept_license, an empty string or null in disk_type, gpu_package and host - so a generated client may send those. Any other empty value is refused first by the body check as invalid_request naming the field: null in name, cores, memory_mb, disk_gb, plan_id, password, ssh_keys, ssh_public_keys, setup, accept_license or gpus, and an empty name or password. Leave such a field out rather than sending null.
What to do
Remove the field that carries a value and keep only public_ipv4 and exactly one entry in networks. A router's size, name and credentials come from the platform and cannot be changed later either, so nothing is lost by omitting them.
Retrying
Fix the request and send it again.
How it arrives
{
"type": "https://docs.fiberax.com/errors/router_field_not_supported",
"title": "A router image takes only a public address and one private network - the platform sets the name, the size and the credentials itself",
"status": 422,
"code": "router_field_not_supported",
"request_id": "a277dcd1ca652c65"
}
Branch your code on code, never on the wording of title.