Werk #23142 · Nov 17, 26
REST API: reject rule values of the wrong type instead of crashing
Creating or updating a rule via the REST API crashed with
AttributeError: 'list' object has no attribute 'split' when the rule
value had a different type than the rule set expects, for example a list
for Notified events for hosts, which expects a string such as "d,r".
The REST API now rejects such a value with a 400 error that names the problem.
This completes werk #23097, which already handled other value shapes the rule set cannot read.
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- REST API
- Versions:
- 3.0.0b1Not yet releasedAll Editions
- 2.5.0p22All Editions
- 2.4.0p44Not yet releasedAll Editions