# Buggy code
def process_update(self, update):
    """Processes a single update.

    Args:
        update (:obj:`str` | :class:`telegram.Update` | :class:`telegram.TelegramError`):
            The update to process.

    """

    # An error happened while polling
    if isinstance(update, TelegramError):
        try:
            self.dispatch_error(None, update)
        except Exception:
            self.logger.exception(
                "An uncaught error was raised while handling the error"
            )
        return

    context = None

    for group in self.groups:
        try:
            for handler in self.handlers[group]:
                check = handler.check_update(update)
                if check is not None and check is not False:
                    if not context and self.use_context:
                        context = CallbackContext.from_update(update, self)
                    handler.handle_update(update, self, check, context)
                    self.update_persistence(update=update)
                    break

        # Stop processing with any other handler.
        except DispatcherHandlerStop:
            self.logger.debug("Stopping further handlers due to DispatcherHandlerStop")
            self.update_persistence(update=update)
            break

        # Dispatch any error.
        except Exception as e:
            try:
                self.dispatch_error(update, e)
            except DispatcherHandlerStop:
                self.logger.debug("Error handler stopped further handlers")
                break
            # Errors should not stop the thread.
            except Exception:
                self.logger.exception(
                    "An error was raised while processing the update and an "
                    "uncaught error was raised while handling the error "
                    "with an error_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 process_update(self, update):
    """Processes a single update.

    Args:
        update (:obj:`str` | :class:`telegram.Update` | :class:`telegram.TelegramError`):
            The update to process.

    """

    # An error happened while polling
    if isinstance(update, TelegramError):
        try:
            self.dispatch_error(None, update)
        except Exception:
            self.logger.exception(
                "An uncaught error was raised while handling the error."
            )
        return

    context = None

    for group in self.groups:
        try:
            for handler in self.handlers[group]:
                check = handler.check_update(update)
                if check is not None and check is not False:
                    if not context and self.use_context:
                        context = CallbackContext.from_update(update, self)
                    handler.handle_update(update, self, check, context)

                    # If handler runs async updating immediately doesn't make sense
                    if not handler.run_async:
                        self.update_persistence(update=update)
                    break

        # Stop processing with any other handler.
        except DispatcherHandlerStop:
            self.logger.debug("Stopping further handlers due to DispatcherHandlerStop")
            self.update_persistence(update=update)
            break

        # Dispatch any error.
        except Exception as e:
            try:
                self.dispatch_error(update, e)
            except DispatcherHandlerStop:
                self.logger.debug("Error handler stopped further handlers")
                break
            # Errors should not stop the thread.
            except Exception:
                self.logger.exception(
                    "An uncaught error was raised while handling the error."
                )