From 8af85df822e7f06abdec26ff045810e767164cdc Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sun, 2 Nov 2014 18:47:11 +0300 Subject: [PATCH] add error code for failed auth Signed-off-by: Vasiliy Tolstov --- builder/digitalocean/api_v2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/digitalocean/api_v2.go b/builder/digitalocean/api_v2.go index a8c0e97ae..30fca2be7 100644 --- a/builder/digitalocean/api_v2.go +++ b/builder/digitalocean/api_v2.go @@ -330,7 +330,7 @@ func NewRequestV2(d DigitalOceanClientV2, path string, method string, req interf resp.StatusCode, body)) } 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 nil