def raise_error(e):
    """Take a bravado-core Error model and raise it as an exception"""
    code = e.error
    if code in code_to_class:
        raise code_to_class[code](e.error_description)
    else:
        raise InternalServerError(e.error_description)