From: Sebastian Harl Date: Sat, 21 Feb 2015 23:20:32 +0000 (+0100) Subject: Don't try to display metric information after the query failed. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9dd37fb3fc46f7b44c593625354913774ea9d185;p=sysdb%2Fwebui.git Don't try to display metric information after the query failed. --- diff --git a/server/query.go b/server/query.go index e303d93..6f9722c 100644 --- a/server/query.go +++ b/server/query.go @@ -111,7 +111,7 @@ func fetch(req request, s *Server) (*page, error) { return nil, fmt.Errorf("%s not found", strings.Title(req.cmd)) } res, err = s.query("FETCH %s %s.%s", identifier(req.cmd), req.args[0], req.args[1]) - if req.cmd == "metric" { + if err == nil && req.cmd == "metric" { return metric(req, res, s) } default: