mirror of
https://github.com/Tech-Workers-Coalition-Italia/mobilizon-reshare.git
synced 2025-02-11 17:20:46 +01:00
* - publishers: Add Zulip publisher. - README.md.: Add Zulip. - LICENSE: `fold -s LICENSE | sed 's/ *$//g' > l; mv l LICENSE` * tests: publishers: Test Zulip publisher. * publishers: templates: Update Zulip template. * zulip: Add more tests. * release.sh: Safer publication. * tests: publishers: Move zulip specific fixtures to test_zulip.py
39 lines
965 B
Python
39 lines
965 B
Python
class PublisherError(Exception):
|
|
""" Generic publisher error """
|
|
|
|
def __init__(self, message):
|
|
""" :param str message: exception message """
|
|
super().__init__(message)
|
|
|
|
|
|
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"""
|