Code

Improved error reporting in graph(): correctly report bad requests.
[sysdb/webui.git] / server / graph.go
index 9406f760158029519ecf32edb07f7993c6dfc632..941e51de6b8a994b65111c26181178e7cc2258c4 100644 (file)
@@ -46,7 +46,7 @@ import (
 
 func (s *Server) graph(w http.ResponseWriter, req request) {
        if len(req.args) != 2 {
-               s.internal(w, fmt.Errorf("Missing host/metric information"))
+               s.badrequest(w, fmt.Errorf("Missing host/metric information"))
        }
 
        host := proto.EscapeString(req.args[0])