1
0
mirror of https://github.com/mje-nz/zerotier-dns.git synced 2024-05-11 05:55:15 +00:00

Print errors from ZeroTier API calls (#2)

This commit is contained in:
Ihor Borodin
2018-11-20 23:15:24 +02:00
committed by GitHub
parent 46da62ae74
commit 1c909f31ca

View File

@ -53,6 +53,7 @@ func getJSON(url, APIToken string, target interface{}) error {
req.Header.Set("Authorization", "bearer "+APIToken)
r, err := c.Do(req)
if err != nil {
fmt.Errorf("API Error: %q", err)
return err
}
if r.StatusCode != 200 {