Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Merge pull request #69 from jrasell/fix-v1-scale-log-msgs
Browse files Browse the repository at this point in the history
endpoint: fix malformed server log messages.
  • Loading branch information
jrasell authored Oct 11, 2019
2 parents 6f829f6 + 6787c68 commit 39d8ca1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/scale/v1/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (s *Scale) InJobGroup(w http.ResponseWriter, r *http.Request) {
Err(err).
Str("job", jobID).
Str("group", groupID).
Msg("failed to determine scaleResp count based on payload and policy")
Msg("failed to determine scale count based on payload and policy")
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
Expand All @@ -88,7 +88,7 @@ func (s *Scale) InJobGroup(w http.ResponseWriter, r *http.Request) {
Err(err).
Str("job", jobID).
Str("group", groupID).
Msg("failed to scaleResp in Nomad job group")
Msg("failed to scale in Nomad job group")
http.Error(w, err.Error(), respCode)
return
}
Expand All @@ -99,7 +99,7 @@ func (s *Scale) InJobGroup(w http.ResponseWriter, r *http.Request) {
}

if respCode == http.StatusNotModified {
http.Error(w, errors.New("unable to scaleResp job").Error(), http.StatusNotModified)
http.Error(w, errors.New("unable to scale job").Error(), http.StatusNotModified)
return
}

Expand Down Expand Up @@ -156,7 +156,7 @@ func (s *Scale) OutJobGroup(w http.ResponseWriter, r *http.Request) {
Err(err).
Str("job", jobID).
Str("group", groupID).
Msg("failed to determine scaleResp count based on payload and policy")
Msg("failed to determine scale count based on payload and policy")
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
Expand All @@ -167,7 +167,7 @@ func (s *Scale) OutJobGroup(w http.ResponseWriter, r *http.Request) {
Err(err).
Str("job", jobID).
Str("group", groupID).
Msg("failed to scaleResp out Nomad job group")
Msg("failed to scale out Nomad job group")
http.Error(w, err.Error(), respCode)
return
}
Expand All @@ -178,7 +178,7 @@ func (s *Scale) OutJobGroup(w http.ResponseWriter, r *http.Request) {
}

if respCode == http.StatusNotModified {
http.Error(w, "unable to scaleResp job", http.StatusNotModified)
http.Error(w, "unable to scale job", http.StatusNotModified)
return
}

Expand Down

0 comments on commit 39d8ca1

Please sign in to comment.