mirror of
https://github.com/status-im/consul.git
synced 2025-02-20 09:28:34 +00:00
agent: Write out the meta data before a potential 404
This commit is contained in:
parent
d6669cef05
commit
e6e4f7c410
@ -47,10 +47,10 @@ func (s *HTTPServer) KVSGet(resp http.ResponseWriter, req *http.Request, args *s
|
|||||||
|
|
||||||
// Make the RPC
|
// Make the RPC
|
||||||
var out structs.IndexedDirEntries
|
var out structs.IndexedDirEntries
|
||||||
defer setMeta(resp, &out.QueryMeta)
|
|
||||||
if err := s.agent.RPC(method, &args, &out); err != nil {
|
if err := s.agent.RPC(method, &args, &out); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
setMeta(resp, &out.QueryMeta)
|
||||||
|
|
||||||
// Check if we get a not found
|
// Check if we get a not found
|
||||||
if len(out.Entries) == 0 {
|
if len(out.Entries) == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user