From 87e41ef8ada917be2bd2519d4ea998949f8f4598 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Aug 03 2018 19:51:19 +0000 Subject: Add warning before raising lightblue exception. I'm adding this because I'm hitting an exception when trying to raise a LightBlueRequestError exception (unable to decode json in the .json() method.) --- diff --git a/freshmaker/lightblue.py b/freshmaker/lightblue.py index ed9a35d..4ee244d 100644 --- a/freshmaker/lightblue.py +++ b/freshmaker/lightblue.py @@ -576,6 +576,9 @@ class LightBlue(object): if status_code == http_client.OK: return + # Warn early, in case there is an error in the error handling code below + log.warn("Request to %s gave %r" % (response.request.url, response)) + if status_code in (http_client.NOT_FOUND, http_client.INTERNAL_SERVER_ERROR, http_client.UNAUTHORIZED):