in this case, err should be nil. avoid dereference

release-0.4
Xiang Li 2013-08-02 20:19:16 -07:00
parent 7ea4ae8693
commit 67b66f75e0
1 changed files with 1 additions and 1 deletions

View File

@ -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