Commit 8af85df8 authored by Vasiliy Tolstov's avatar Vasiliy Tolstov

add error code for failed auth

Signed-off-by: default avatarVasiliy Tolstov <v.tolstov@selfip.ru>
parent a5dc41a7
...@@ -330,7 +330,7 @@ func NewRequestV2(d DigitalOceanClientV2, path string, method string, req interf ...@@ -330,7 +330,7 @@ func NewRequestV2(d DigitalOceanClientV2, path string, method string, req interf
resp.StatusCode, body)) resp.StatusCode, body))
} }
switch resp.StatusCode { switch resp.StatusCode {
case 403, 429, 422, 404, 503, 500: case 403, 401, 429, 422, 404, 503, 500:
return errors.New(fmt.Sprintf("digitalocean request error: %+v", res)) return errors.New(fmt.Sprintf("digitalocean request error: %+v", res))
} }
return nil return nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment