Werk #22083 · Jul 31, 26
REST API: report unknown hosts when creating a comment
Creating a comment for a host that is not monitored made the REST API return an internal error and write a crash report, instead of telling you what was wrong. Affected are the endpoints "Create a host comment" and "Create a service comment", when the comment is addressed to a host name rather than to a query.
The same situation was already reported properly for the query based variant of these endpoints, which answers with "The query did not match any host".
The endpoints now answer with a 404 and the message "The requested host was not found".
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- REST API
- Versions:
- 3.0.0b1Not yet releasedAll Editions
- 2.5.0p11All Editions