def _default_error_handler(err: Exception) -> Exception:
    """Since the server runs in its own thread context, it
        can't simply raise an error for the caller to catch.
        The caller can provide an error handler as a
        callback when exceptions are raised, this is the
        default handler that simply prints to the console.

        :param err: The exception raised.
        :returns: The exception after printing.
    """
    print(err)
    return err