Skip to content
Permalink
Browse files

fix(scheduler): show more information when there is a HTTP error in K…

…ubernetes (#1041)
  • Loading branch information...
helgi committed Sep 10, 2016
1 parent 667ba1f commit 29d51d99c4ed4eb47cfd7a9cd1900c670dd6ffa8
Showing with 6 additions and 2 deletions.
  1. +6 −2 rootfs/scheduler/exceptions.py
@@ -7,10 +7,14 @@ class KubeHTTPException(KubeException):
def __init__(self, response, errmsg, *args, **kwargs):
self.response = response

data = response.json()
message = data['message'] if 'message' in data else ''

msg = errmsg.format(*args)
msg = "failed to {}: {} {}".format(
msg = 'failed to {}: {} {} {}'.format(
msg,
response.status_code,
response.reason
response.reason,
message
)
KubeException.__init__(self, msg, *args, **kwargs)

0 comments on commit 29d51d9

Please sign in to comment.
You can’t perform that action at this time.