diff --git a/mlflow/exceptions.py b/mlflow/exceptions.py index b998129897ce6..22a5e6135d42e 100644 --- a/mlflow/exceptions.py +++ b/mlflow/exceptions.py @@ -67,10 +67,11 @@ class RestException(MlflowException): """Exception thrown on non 200-level responses from the REST API""" def __init__(self, json): + print(json, type(json)) try: error_code = json.get("error_code", ErrorCode.Name(INTERNAL_ERROR)) except Exception as e: - raise Exception(json) from e + raise Exception(json, type(json)) from e message = "%s: %s" % ( error_code, json["message"] if "message" in json else "Response: " + str(json),