NSX|V: Fix vcns timeout exception
Using a dedicated timeout exception for vcns calls timeout The exception used before was logged as 'unprintable' since it didn't include the relevant parameters Change-Id: I706f3819ecaa180752e7c1926f7ec63510962f3a
This commit is contained in:
parent
14399bdf0b
commit
de1de539fb
@ -144,7 +144,7 @@ class VcnsApiHelper(object):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=self.timeout)
|
timeout=self.timeout)
|
||||||
except requests.exceptions.Timeout:
|
except requests.exceptions.Timeout:
|
||||||
raise exceptions.VcnsApiException(uri=uri)
|
raise exceptions.ResourceTimedOut(uri=uri)
|
||||||
|
|
||||||
status = response.status_code
|
status = response.status_code
|
||||||
|
|
||||||
|
@ -62,6 +62,10 @@ class ResourceNotFound(VcnsApiException):
|
|||||||
message = _("Resource %(uri)s not found")
|
message = _("Resource %(uri)s not found")
|
||||||
|
|
||||||
|
|
||||||
|
class ResourceTimedOut(VcnsApiException):
|
||||||
|
message = _("Resource %(uri)s timed out")
|
||||||
|
|
||||||
|
|
||||||
class MediaTypeUnsupport(VcnsApiException):
|
class MediaTypeUnsupport(VcnsApiException):
|
||||||
message = _("Media Type %(uri)s is not supported")
|
message = _("Media Type %(uri)s is not supported")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user