Skip to content

Commit

Permalink
log marathon error message for debugging (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamarrow committed Sep 30, 2016
1 parent ec496dc commit 925ec2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dcos/marathon.py
Expand Up @@ -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:
Expand Down

0 comments on commit 925ec2f

Please sign in to comment.