All error codes

invalid_firewall_rule

HTTP 422 Firewall rule was rejected

What happened

One rule in the set was rejected. The usual cause is a port set with no protocol; the platform also rejects an unknown macro, an unknown alias or address set, and malformed protocol, port, source or destination values.

What to do

When invalid_params is present it names the rule position and field, such as rules[2].protocol; otherwise check the set for an unknown macro, an unknown alias or a malformed protocol, port, source or destination value. Fix that rule and send the whole set again; the rule set on the server is left as it was.

Retrying

Fix the request and send it again.

How it arrives

{
    "type": "https://docs.fiberax.com/errors/invalid_firewall_rule",
    "title": "Firewall rule was rejected",
    "status": 422,
    "code": "invalid_firewall_rule",
    "request_id": "a277dcd1ca652c65"
}

Branch your code on code, never on the wording of title.