Actions
Bug #22225
closedDocumentation for Modify Settings example missing parameter
Pull Request:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
I was bothered the first time
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No
Description
The curl
example at https://docs.rudder.io/api/v/16/#tag/Settings/operation/modifyAllowedNetworks is:
curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/settings/allowed_networks/root/diff --data '{"allowed_networks": { "delete": ["192.168.1.0/24"], "add": ["192.168.2.0/24"] } }'
It is missing the --header 'Content-Type: application/json'
, and it will throw a cryptic error message like:
"errorDetails": "Error when trying to modify allowed networks for policy server 'root' <- Impossible to parse allowed networks diff json. Expected {\"allowed_networks\": {\"add\":[\"192.168.2.0/24\", ...]\", \"delete\":[\"192.168.1.0/24\", ...]\"}}, got: nothing"
Actions