add error code for failed auth

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
Vasiliy Tolstov 2014-11-02 18:47:11 +03:00
parent a5dc41a730
commit 8af85df822
1 changed files with 1 additions and 1 deletions

View File

@ -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