Skip to content

Commit

Permalink
[mesh] Fix typo of error message (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxx7xxxx committed Jul 12, 2021
1 parent 6d63a22 commit 497b332
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/object/meshcontroller/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ func (a *API) convertPBToSpec(pbSpec interface{}, spec interface{}) error {
}

func (a *API) readAPISpec(w http.ResponseWriter, r *http.Request, pbSpec interface{}, spec interface{}) error {
// TODO: Use default spec and validate it.

body, err := ioutil.ReadAll(r.Body)
if err != nil {
return fmt.Errorf("read body failed: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/object/meshcontroller/api/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (a *API) updateService(w http.ResponseWriter, r *http.Request) {
newTenantSpec := a.service.GetTenantSpec(serviceSpec.RegisterTenant)
if newTenantSpec == nil {
api.HandleAPIError(w, r, http.StatusBadRequest,
fmt.Errorf("tenant %s not found", serviceName))
fmt.Errorf("tenant %s not found", serviceSpec.RegisterTenant))
return
}
newTenantSpec.Services = append(newTenantSpec.Services, serviceSpec.Name)
Expand Down

0 comments on commit 497b332

Please sign in to comment.