Permalink
Browse files

Handle cx predict intermediate API unavailable state

  • Loading branch information...
deliahu committed Feb 9, 2019
1 parent 471704e commit c45619fa32bf042c73637f540c925c53fe63b2ca
Showing with 1 addition and 1 deletion.
  1. +1 −1 cli/cmd/predict.go
@@ -80,7 +80,7 @@ var predictCmd = &cobra.Command{
apiURL := util.URLJoin(resourcesRes.APIsBaseURL, apiPath)
predictResponse, err := makePredictRequest(apiURL, samplesJSONPath)
if err != nil {
if strings.Contains(err.Error(), "503 Service Temporarily Unavailable") {
if strings.Contains(err.Error(), "503 Service Temporarily Unavailable") || strings.Contains(err.Error(), "502 Bad Gateway") {
errors.Exit(s.ErrApiNotReady(apiName, resource.StatusAPIUpdating.Message()))
}
errors.Exit(err)

0 comments on commit c45619f

Please sign in to comment.