Unverified Commit 69a7cac5 authored by Charlie Voiselle's avatar Charlie Voiselle
Browse files

Fixup: Use `http` consts for response codes

parent 9f651beb
Branches unavailable
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -9,7 +9,7 @@ import (
func (s *HTTPServer) SecureVariablesListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
if req.Method != "GET" {
return nil, CodedError(405, ErrInvalidMethod)
return nil, CodedError(http.StatusMethodNotAllowed, ErrInvalidMethod)
}
args := structs.SecureVariablesListRequest{}
......@@ -64,7 +64,7 @@ func (s *HTTPServer) secureVariableQuery(resp http.ResponseWriter, req *http.Req
setMeta(resp, &out.QueryMeta)
if out.Data == nil {
return nil, CodedError(404, "Secure variable not found")
return nil, CodedError(http.StatusNotFound, "Secure variable not found")
}
return out.Data, nil
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment