mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-17 07:55:19 +00:00
cmd/tailscale: show web 'login' error message
For #1939 Signed-off-by: David Crawshaw <crawshaw@tailscale.com> (cherry picked from commit 50c976d3f18fde14728a6e1099d4c738ff434963)
This commit is contained in:
parent
118cf0cd75
commit
039541661e
@ -214,7 +214,8 @@ func webHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
url, err := tailscaleUpForceReauth(r.Context())
|
url, err := tailscaleUpForceReauth(r.Context())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
json.NewEncoder(w).Encode(mi{"error": err})
|
w.WriteHeader(500)
|
||||||
|
json.NewEncoder(w).Encode(mi{"error": err.Error()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
json.NewEncoder(w).Encode(mi{"url": url})
|
json.NewEncoder(w).Encode(mi{"url": url})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user