1 """ Taskcluster client exceptions """
4 class TaskclusterFailure(Exception):
5 """ Base exception for all Taskcluster client errors"""
9 class TaskclusterRestFailure(TaskclusterFailure
):
10 """ Failures in the HTTP Rest API """
11 def __init__(self
, msg
, superExc
, status_code
=500, body
={}):
12 TaskclusterFailure
.__init
__(self
, msg
)
13 self
.superExc
= superExc
14 self
.status_code
= status_code
18 class TaskclusterConnectionError(TaskclusterFailure
):
19 """ Error connecting to resource """
20 def __init__(self
, msg
, superExc
):
21 TaskclusterFailure
.__init
__(self
, msg
, superExc
)
22 self
.superExc
= superExc
25 class TaskclusterAuthFailure(TaskclusterFailure
):
26 """ Invalid Credentials """
27 def __init__(self
, msg
, superExc
=None, status_code
=500, body
={}):
28 TaskclusterFailure
.__init
__(self
, msg
)
29 self
.superExc
= superExc
30 self
.status_code
= status_code
34 class TaskclusterTopicExchangeFailure(TaskclusterFailure
):
35 """ Error while creating a Topic Exchange routing key """
39 class TaskclusterArtifactError(TaskclusterFailure
):
40 """Download of an 'error' Artifact"""
41 def __init__(self
, message
, reason
):
42 TaskclusterFailure
.__init
__(self
, message
)