Преглед изворни кода

in this case, err should be nil. avoid dereference

Xiang Li пре 13 година
родитељ
комит
67b66f75e0
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      client_handlers.go

+ 1 - 1
client_handlers.go

@@ -131,7 +131,7 @@ func dispatch(c Command, w *http.ResponseWriter, req *http.Request, client bool)
 
 			if body == nil {
 				(*w).WriteHeader(http.StatusNotFound)
-				(*w).Write(newJsonError(100, err.Error()))
+				(*w).Write(newJsonError(100, ""))
 			} else {
 				body, ok := body.([]byte)
 				// this should not happen