-
Bug
-
Resolution: Done
-
Minor
-
2.2 GA, SaaS
-
None
-
3scale 2019-12-09, 3scale 2019-12-23, 3scale 2020-01-13, 3scale 2020-01-27, 3scale 2020-02-03, 3scale 2020-02-17, 3scale 2020-03-09, 3scale 2020-03-23
If the value of the policies_config parameter is not of an expected data type (e.g not an array), a 500 – Internal Server Error is thrown.
Example:
curl -v -X PUT "https://3scale-admin.<DOMAIN>/admin/api/services/2/proxy/policies.json" -d 'access_token=<ACCESS_TOKEN>&policies_config=%7B%22policies_config%22%3A%5B%7B%22name%22%3A%22apicast%22%2C%22version%22%3A%22builtin%22%2C%22configuration%22%3A%7B%7D%2C%22enabled%22%3Atrue%7D%5D%7D'
The payload is:
{"policies_config":[{"name":"apicast","version":"builtin","configuration":{},"enabled":true}]}
The exception shouldn't be raised, and some useful error message should be shown here instead.
The documentation also needs to be improved and indicate what's the expected format of the parameter value.
Dev notes
1. Rework on the documentation, as people make mistake often
2. Add a custom validation for the policy chain instead of failing hard (please talk to hramihaj)
- is documented by
-
THREESCALE-5899 Document how to set policies_config with correct JSON format
- Closed