Werk #22083: REST API: report unknown hosts when creating a comment
| Component | REST API | ||||
| Title | REST API: report unknown hosts when creating a comment | ||||
| Date | Jul 31, 2026 | ||||
| Level | Trivial Change | ||||
| Class | Bug Fix | ||||
| Compatibility | Compatible - no manual interaction needed | ||||
| Checkmk versions & editions |
|
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".