def original_error(err):
    """
    Returns original exception from graphql exception wrappers.

    graphql-core wraps exceptions that occurs on resolvers into special type
    with ``original_error`` attribute, which contains the real exception.
    """
    return err.original_error if hasattr(err, 'original_error') else err
