correct http status code for racs/getfaillist api
This commit is contained in:
parent
9950e7d6ab
commit
7a3a282c71
@ -592,8 +592,11 @@ func handleRacsGetFailList(w http.ResponseWriter, r *http.Request) {
|
||||
rst["Result"] = "NG"
|
||||
rst["ErrMsg"] = "racs.HandleGetFailList: " + err.Error()
|
||||
logger.Printf("[ERR] %s; %s; %s\r\n", addr, uri, rst["ErrMsg"])
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
fmt.Fprintf(w, "%v", rpl.Replace(fmt.Sprintf("%#v", rst)))
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintf(w, "%v", rpl.Replace(string(jsonData)))
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user