def on_http_error(error):
def wrap(f):<EOL><INDENT>@functools.wraps(f)<EOL>def wrapped_f(*args, **kwargs):<EOL><INDENT>try:<EOL><INDENT>return f(*args, **kwargs)<EOL><DEDENT>except GitlabHttpError as e:<EOL><INDENT>raise error(e.error_message, e.response_code, e.response_body)<EOL><DEDENT><DEDENT>return wrapped_f<EOL><DEDENT>return wrap<EOL>
Manage GitlabHttpError exceptions.

    This decorator function can be used to catch GitlabHttpError exceptions
    raise specialized exceptions instead.

    Args:
        error(Exception): The exception type to raise -- must inherit from
            GitlabError