File avoid-traceback-when-http.query-request-cannot-be-pe.patch of Package salt

From 2fecfe18cf17389714ab5bed0ff59bec2d1e1c36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
 <psuarezhernandez@suse.com>
Date: Mon, 29 Jul 2019 11:17:53 +0100
Subject: [PATCH] Avoid traceback when http.query request cannot be
 performed (bsc#1128554)

Improve error logging when http.query cannot be performed
---
 salt/utils/http.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/salt/utils/http.py b/salt/utils/http.py
index 5ab4503f61..9522bd6ee4 100644
--- a/salt/utils/http.py
+++ b/salt/utils/http.py
@@ -628,12 +628,17 @@ def query(
         except salt.ext.tornado.httpclient.HTTPError as exc:
             ret["status"] = exc.code
             ret["error"] = str(exc)
+            log.error(
+                "Cannot perform 'http.query': {} - {}".format(url_full, ret["error"])
+            )
             return ret
         except (socket.herror, OSError, socket.timeout, socket.gaierror) as exc:
             if status is True:
                 ret["status"] = 0
             ret["error"] = str(exc)
-            log.debug("Cannot perform 'http.query': %s - %s", url_full, ret["error"])
+            log.error(
+                "Cannot perform 'http.query': {} - {}".format(url_full, ret["error"])
+            )
             return ret
 
         if stream is True or handle is True:
-- 
2.29.2
openSUSE Build Service is sponsored by