Improve error message

This commit is contained in:
Lorenz Kästle 2025-09-15 00:22:08 +02:00
parent 6ae8ba9110
commit def42dc686

View file

@ -230,9 +230,8 @@ mp_subcheck check_http(const check_curl_config config, check_curl_working_state
/* Curl errors, result in critical Nagios state */
if (res != CURLE_OK) {
xasprintf(&sc_curl.output,
_("Invalid HTTP response received from host on port %d: cURL returned %d - %s"),
workingState.serverPort, res, errbuf[0] ? errbuf : curl_easy_strerror(res));
xasprintf(&sc_curl.output, _("Error while performing connectiion: cURL returned %d - %s"),
res, errbuf[0] ? errbuf : curl_easy_strerror(res));
sc_curl = mp_set_subcheck_state(sc_curl, STATE_CRITICAL);
mp_add_subcheck_to_subcheck(&sc_result, sc_curl);
return sc_result;