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

endpoint: fix malformed server log messages. #69

Merged
merged 1 commit into from
Oct 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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