From c1ba661252f77886a5a26c6d3db46ce40acb1714 Mon Sep 17 00:00:00 2001 From: OlivierKuziemko <83703305+OlivierKuziemko@users.noreply.github.com> Date: Fri, 22 Oct 2021 10:18:58 +0200 Subject: [PATCH] enh(curl): manage unknown http code (#3212) Updating curl.pm to manage http code which are not include in http_code_explained --- centreon/plugins/backend/http/curl.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centreon/plugins/backend/http/curl.pm b/centreon/plugins/backend/http/curl.pm index e51d97bcc..493309c84 100644 --- a/centreon/plugins/backend/http/curl.pm +++ b/centreon/plugins/backend/http/curl.pm @@ -467,7 +467,7 @@ sub get_code { sub get_message { my ($self, %options) = @_; - return $http_code_explained->{$self->{response_code}}; + return defined($http_code_explained->{$self->{response_code}}) ? $http_code_explained->{$self->{response_code}} : 'Unknown code'; } sub get_certificate {