Skip to content
Snippets Groups Projects
Commit bc9af88a authored by Amber Brown's avatar Amber Brown
Browse files

fix

parent 90f8e606
No related branches found
No related tags found
No related merge requests found
...@@ -93,7 +93,7 @@ class SimpleHttpClient(object): ...@@ -93,7 +93,7 @@ class SimpleHttpClient(object):
outgoing_requests_counter.labels(method).inc() outgoing_requests_counter.labels(method).inc()
# log request but strip `access_token` (AS requests for example include this) # log request but strip `access_token` (AS requests for example include this)
logger.info("Sending request %s %s", method, redact_uri(uri.encode('ascii'))) logger.info("Sending request %s %s", method, redact_uri(uri))
try: try:
request_deferred = treq.request( request_deferred = treq.request(
...@@ -108,14 +108,14 @@ class SimpleHttpClient(object): ...@@ -108,14 +108,14 @@ class SimpleHttpClient(object):
incoming_responses_counter.labels(method, response.code).inc() incoming_responses_counter.labels(method, response.code).inc()
logger.info( logger.info(
"Received response to %s %s: %s", "Received response to %s %s: %s",
method, redact_uri(uri.encode('ascii')), response.code method, redact_uri(uri), response.code
) )
defer.returnValue(response) defer.returnValue(response)
except Exception as e: except Exception as e:
incoming_responses_counter.labels(method, "ERR").inc() incoming_responses_counter.labels(method, "ERR").inc()
logger.info( logger.info(
"Error sending request to %s %s: %s %s", "Error sending request to %s %s: %s %s",
method, redact_uri(uri.encode('ascii')), type(e).__name__, e.args[0] method, redact_uri(uri), type(e).__name__, e.args[0]
) )
raise raise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment