Backed out 3 changesets (bug 1790375) for causing wd failures on fetch_error.py....
[gecko.git] / third_party / python / taskcluster / taskcluster / exceptions.py
blobbcfc9b1b64b4a59344d872855aa20a6b87943cb1
1 """ Taskcluster client exceptions """
4 class TaskclusterFailure(Exception):
5 """ Base exception for all Taskcluster client errors"""
6 pass
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
15 self.body = body
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
31 self.body = body
34 class TaskclusterTopicExchangeFailure(TaskclusterFailure):
35 """ Error while creating a Topic Exchange routing key """
36 pass
39 class TaskclusterArtifactError(TaskclusterFailure):
40 """Download of an 'error' Artifact"""
41 def __init__(self, message, reason):
42 TaskclusterFailure.__init__(self, message)
43 self.reason = reason