engine: resources: Add an http error wrapper

This makes it easier to return errors more succinctly.
This commit is contained in:
James Shubin
2024-02-16 06:15:38 -05:00
parent e256d886e0
commit 7698b1b5fd
2 changed files with 10 additions and 8 deletions

View File

@@ -122,8 +122,7 @@ func (obj *HTTPFlagRes) ServeHTTP(w http.ResponseWriter, req *http.Request) {
//requestPath := req.URL.Path
//if err := req.ParseForm(); err != nil { // needed to access querystring
// msg, httpStatus := toHTTPError(err)
// http.Error(w, msg, httpStatus)
// sendHTTPError(w, err)
// return
//}
if obj.Key != "" {