# Buggy code
def add_handler(self, handler, group=DEFAULT_GROUP):
    """Register a handler.

    TL;DR: Order and priority counts. 0 or 1 handlers per group will be used. End handling of
    update with :class:`telegram.ext.DispatcherHandlerStop`.

    A handler must be an instance of a subclass of :class:`telegram.ext.Handler`. All handlers
    are organized in groups with a numeric value. The default group is 0. All groups will be
    evaluated for handling an update, but only 0 or 1 handler per group will be used. If
    :class:`telegram.ext.DispatcherHandlerStop` is raised from one of the handlers, no further
    handlers (regardless of the group) will be called.

    The priority/order of handlers is determined as follows:

      * Priority of the group (lower group number == higher priority)
      * The first handler in a group which should handle an update (see
        :attr:`telegram.ext.Handler.check_update`) will be used. Other handlers from the
        group will not be used. The order in which handlers were added to the group defines the
        priority.

    Args:
        handler (:class:`telegram.ext.Handler`): A Handler instance.
        group (:obj:`int`, optional): The group identifier. Default is 0.

    """
    # Unfortunately due to circular imports this has to be here
    from .conversationhandler import ConversationHandler

    if not isinstance(handler, Handler):
        raise TypeError("handler is not an instance of {}".format(Handler.__name__))
    if not isinstance(group, int):
        raise TypeError("group is not int")
    if isinstance(handler, ConversationHandler) and handler.persistent:
        if not self.persistence:
            raise ValueError(
                "Conversationhandler {} can not be persistent if dispatcher has no "
                "persistence".format(handler.name)
            )
        handler.persistence = self.persistence
        handler.conversations = self.persistence.get_conversations(handler.name)

    if group not in self.handlers:
        self.handlers[group] = list()
        self.groups.append(group)
        self.groups = sorted(self.groups)

    self.handlers[group].append(handler)


# Traceback (telegram.error.BadRequest)
<project_path>/venv/bin/python <project_path>/issue.py
2017-06-20 23:24:11,743 - __main__ - INFO - /start
2017-06-20 23:24:11,906 - telegram.ext.dispatcher - WARNING - A TelegramError was raised while processing the Update.
2017-06-20 23:24:11,907 - __main__ - ERROR - Boom!
2017-06-20 23:24:11,907 - __main__ - INFO - /async_start
2017-06-20 23:24:12,188 - telegram.utils.promise - ERROR - An uncaught error was raised while running the promise
Traceback (most recent call last):
File "<project_path>/venv/src/python-telegram-bot/telegram/utils/promise.py", line 42, in run
self._result = self.pooled_function(*self.args, **self.kwargs)
File "<project_path>/issue.py", line 25, in action_async_start
update.message.reply_text(msg, parse_mode=ParseMode.HTML)
File "<project_path>/venv/src/python-telegram-bot/telegram/message.py", line 340, in reply_text
return self.bot.send_message(self.chat_id, *args, **kwargs)
File "<project_path>/venv/src/python-telegram-bot/telegram/bot.py", line 125, in decorator
result = func(self, *args, **kwargs)
File "<project_path>/venv/src/python-telegram-bot/telegram/bot.py", line 158, in decorator
return Bot._message_wrapper(self, url, data, *args, **kwargs)
File "<project_path>/venv/src/python-telegram-bot/telegram/bot.py", line 146, in _message_wrapper
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "<project_path>/venv/src/python-telegram-bot/telegram/utils/request.py", line 252, in post
**urlopen_kwargs)
File "<project_path>/venv/src/python-telegram-bot/telegram/utils/request.py", line 194, in _request_wrapper
raise BadRequest(message)
telegram.error.BadRequest: Can't parse entities in message text: unsupported start tag "invalid_tag" at byte offset 0

Process finished with exit code 0

# Fixed code
def add_handler(self, handler, group=DEFAULT_GROUP):
    """Register a handler.

    TL;DR: Order and priority counts. 0 or 1 handlers per group will be used. End handling of
    update with :class:`telegram.ext.DispatcherHandlerStop`.

    A handler must be an instance of a subclass of :class:`telegram.ext.Handler`. All handlers
    are organized in groups with a numeric value. The default group is 0. All groups will be
    evaluated for handling an update, but only 0 or 1 handler per group will be used. If
    :class:`telegram.ext.DispatcherHandlerStop` is raised from one of the handlers, no further
    handlers (regardless of the group) will be called.

    The priority/order of handlers is determined as follows:

      * Priority of the group (lower group number == higher priority)
      * The first handler in a group which should handle an update (see
        :attr:`telegram.ext.Handler.check_update`) will be used. Other handlers from the
        group will not be used. The order in which handlers were added to the group defines the
        priority.

    Args:
        handler (:class:`telegram.ext.Handler`): A Handler instance.
        group (:obj:`int`, optional): The group identifier. Default is 0.

    """
    # Unfortunately due to circular imports this has to be here
    from .conversationhandler import ConversationHandler

    if not isinstance(handler, Handler):
        raise TypeError("handler is not an instance of {}".format(Handler.__name__))
    if not isinstance(group, int):
        raise TypeError("group is not int")
    if isinstance(handler, ConversationHandler) and handler.persistent:
        if not self.persistence:
            raise ValueError(
                "ConversationHandler {} can not be persistent if dispatcher has no "
                "persistence".format(handler.name)
            )
        handler.persistence = self.persistence
        handler.conversations = self.persistence.get_conversations(handler.name)

    if group not in self.handlers:
        self.handlers[group] = list()
        self.groups.append(group)
        self.groups = sorted(self.groups)

    self.handlers[group].append(handler)