From 925ec2fc281d02219ff7b95fbe64ce3e9f381abe Mon Sep 17 00:00:00 2001 From: tamarrow Date: Fri, 30 Sep 2016 15:26:09 -0700 Subject: [PATCH] log marathon error message for debugging (#789) --- dcos/marathon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dcos/marathon.py b/dcos/marathon.py index 3a314a0ff..e14d7df6b 100644 --- a/dcos/marathon.py +++ b/dcos/marathon.py @@ -159,6 +159,10 @@ def http_req(self, method_fn, path, *args, **kwargs): try: return method_fn(url, *args, **kwargs) except DCOSHTTPException as e: + + logger.error('Marathon Error: %s\n%s', + e.response.reason, e.response.text) + # Marathon is buggy and sometimes returns JSON, sometimes returns # HTML. We only include the body in the error message if it's JSON. try: