mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 04:39:07 -10:00
We can't use taskcluster 5.0.0 yet, because taskcluster-proxy does not support new-style URLs. Differential Revision: https://phabricator.services.mozilla.com/D10146
37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
""" Taskcluster client exceptions """
|
|
|
|
|
|
class TaskclusterFailure(Exception):
|
|
""" Base exception for all Taskcluster client errors"""
|
|
pass
|
|
|
|
|
|
class TaskclusterRestFailure(TaskclusterFailure):
|
|
""" Failures in the HTTP Rest API """
|
|
def __init__(self, msg, superExc, status_code=500, body={}):
|
|
TaskclusterFailure.__init__(self, msg)
|
|
self.superExc = superExc
|
|
self.status_code = status_code
|
|
self.body = body
|
|
|
|
|
|
class TaskclusterConnectionError(TaskclusterFailure):
|
|
""" Error connecting to resource """
|
|
def __init__(self, msg, superExc):
|
|
TaskclusterFailure.__init__(self, msg, superExc)
|
|
self.superExc = superExc
|
|
|
|
|
|
class TaskclusterAuthFailure(TaskclusterFailure):
|
|
""" Invalid Credentials """
|
|
def __init__(self, msg, superExc=None, status_code=500, body={}):
|
|
TaskclusterFailure.__init__(self, msg)
|
|
self.superExc = superExc
|
|
self.status_code = status_code
|
|
self.body = body
|
|
|
|
|
|
class TaskclusterTopicExchangeFailure(TaskclusterFailure):
|
|
""" Error while creating a Topic Exchange routing key """
|
|
pass
|