mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-25 18:41:10 +01:00
fix serving wrong cert
This commit is contained in:
@@ -32,7 +32,11 @@ func AddAgent(args []string) {
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
logging.Fatal().Int("status", resp.StatusCode).Msg("failed to add agent")
|
||||
msg, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
msg = []byte("unknown error")
|
||||
}
|
||||
logging.Fatal().Int("status", resp.StatusCode).Str("msg", string(msg)).Msg("failed to add agent")
|
||||
}
|
||||
|
||||
zip, err := io.ReadAll(resp.Body)
|
||||
|
||||
Reference in New Issue
Block a user