Skip to content

Commit

Permalink
Changed error response with json in createNewLxcHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
vin0298 committed Aug 24, 2018
1 parent 6212912 commit ea4937c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ func (s *scheduler) createNewLxcHandler(w http.ResponseWriter, r *http.Request)

respondWithJSON(w, http.StatusOK, newLxc)
} else {
log.Errorf("Lxc with name %s already exists", newLxc.Name)
errStr := fmt.Sprintf("Lxc with name %s already exists", newLxc.Name)
respondWithError(w, http.StatusBadRequest, errStr)
}
}

Expand Down

0 comments on commit ea4937c

Please sign in to comment.