add error code for failed auth
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
parent
a5dc41a730
commit
8af85df822
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue