You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, the MLFlowClient.jl simply throw out HTTP.Exceptions.StatusError or use hard code error message, and this is hard to figuar out what is wrong.
I found that for any 4xx and 5xx JSON response, it will give a error message:
{
"error_code": "RESOURCE_DOES_NOT_EXIST",
"message": "Could not find experiment with ID 0004"
}
So, why not parse and throw this error message , rather than manually hard code error message like:
catch e
ifisa(e, HTTP.ExceptionRequest.StatusError) && e.status ==400
error_code = JSON.parse(String(e.response.body))["error_code"]
# if error_code == MLFLOW_ERROR_CODES.RESOURCE_ALREADY_EXISTS# error("Experiment with name \"$name\" already exists")#end
error_message = JSON.parse(String(e.response.body))["error_message"]
error(error_message)
endthrow(e)
end
We can add a unified error handler, if you think this is useful I can implement it and open a pull request!
Thanks!
The text was updated successfully, but these errors were encountered:
For now, the MLFlowClient.jl simply throw out
HTTP.Exceptions.StatusError
or use hard code error message, and this is hard to figuar out what is wrong.I found that for any 4xx and 5xx JSON response, it will give a error message:
So, why not parse and throw this error message , rather than manually hard code error message like:
We can add a unified error handler, if you think this is useful I can implement it and open a pull request!
Thanks!
The text was updated successfully, but these errors were encountered: