mirror of
https://github.com/Tech-Workers-Coalition-Italia/mobilizon-reshare.git
synced 2025-01-30 00:55:13 +01:00
5bce70b4a1
* added failed publication retrieval * completed retry command * added more error handling * added atomic to query
45 lines
1022 B
Python
45 lines
1022 B
Python
class PublisherError(Exception):
|
|
""" Generic publisher error """
|
|
|
|
pass
|
|
|
|
|
|
class InvalidAttribute(PublisherError):
|
|
""" Publisher defined with invalid or missing attribute """
|
|
|
|
|
|
class InvalidBot(PublisherError):
|
|
""" Publisher refers to the wrong service bot """
|
|
|
|
|
|
class InvalidCredentials(PublisherError):
|
|
""" Publisher cannot validate credentials """
|
|
|
|
|
|
class InvalidEvent(PublisherError):
|
|
""" Publisher cannot validate events """
|
|
|
|
|
|
class InvalidMessage(PublisherError):
|
|
""" Publisher cannot validate message """
|
|
|
|
|
|
class InvalidResponse(PublisherError):
|
|
""" Publisher receives an invalid response from its service """
|
|
|
|
|
|
class InvalidSettings(PublisherError):
|
|
""" Publisher settings are either missing or badly configured """
|
|
|
|
|
|
class ZulipError(PublisherError):
|
|
""" Publisher receives an error response from Zulip"""
|
|
|
|
|
|
class HTTPResponseError(PublisherError):
|
|
""" Publisher receives a HTTP error"""
|
|
|
|
|
|
class EventNotFound(Exception):
|
|
""" Event is not present in the database """
|