mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-31 16:23:44 +00:00
use the error value
This commit is contained in:
parent
82e6b2508a
commit
4040e14cb8
@ -142,6 +142,10 @@ func (c *Consensus) makeCommandMux(auth *authorization) *http.ServeMux {
|
||||
return
|
||||
}
|
||||
result, err := c.executeCommandLocally(cmd)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if err := json.NewEncoder(w).Encode(result); err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user