from sirbot.core.errors import MessageError, SirBotALotError


class SlackClientError(SirBotALotError):
    """Generic slack client error"""


class SlackConnectionError(SlackClientError):
    """Connection to slack server error"""


class SlackServerError(SlackClientError):
    """Internal slack server error"""


class SlackRedirectionError(SlackClientError):
    """Redirection status code"""


class SlackAPIError(SlackClientError):
    """Wrong use of slack API"""

    def __init__(self, response):
        self.ok = response.get('ok')
        self.error = response.get('error')
        self.response = response


# class SlackChannelNotFound(SlackClientError):
#     """Channel non existent or not available to the bot"""
#
#     def __init__(self, id_=None, name=None):
#         self.id = id_
#         self.name = name


class SlackMessageError(MessageError):
    """Generic slack message error"""


class SlackUnknownEndpoint(MessageError):
    """"""


class SlackUnknownAction(SlackUnknownEndpoint):
    """Unknown incoming action"""

    def __init__(self, action):
        self.action = action


class SlackUnknownCommand(SlackUnknownEndpoint):
    """Unknown incoming command"""

    def __init__(self, command):
        self.command = command


class SlackSetupError(SirBotALotError):
    """Error during slack plugin configuration"""

@@ -27,22 +27,8 @@
 port
- MessageError,
  Sir
@@ -49,30 +49,24 @@
 %0Aclass Slack
-Client
 Error(SirBot
@@ -102,20 +102,173 @@
 ack 
-client error
+error%22%22%22%0A%0A%0Aclass SlackSetupError(SlackError):%0A    %22%22%22Error during slack plugin configuration%22%22%22%0A%0A%0Aclass SlackClientError(SlackError):%0A    %22%22%22Error with the slack API
 %22%22%22%0A
@@ -747,18 +747,16 @@
 ponse%0A%0A%0A
-# 
 class Sl
@@ -762,237 +762,26 @@
 lack
-ChannelNotFound(SlackClientError):%0A#     %22%22%22Channel non existent or not available to the bot%22%22%22%0A#%0A#     def __init__(self, id_=None, name=None):%0A#         self.id = id_%0A#         self.name = name%0A%0A%0Aclass SlackMessageError(Message
+MessageError(Slack
 Erro
@@ -851,23 +851,21 @@
 ndpoint(
-Message
+Slack
 Error):%0A
@@ -1176,96 +1176,4 @@
 and%0A
-%0A%0Aclass SlackSetupError(SirBotALotError):%0A    %22%22%22Error during slack plugin configuration%22%22%22%0A

Update slack errors type