Commit 895db383 authored by Jack Pearkes's avatar Jack Pearkes

Merge pull request #1411 from chrisfarms/master

fix panic when vagrant cloud response fails
parents 1e5d7467 51f55dda
......@@ -33,7 +33,12 @@ func (s *stepVerifyBox) Run(state multistep.StateBag) multistep.StepAction {
path := fmt.Sprintf("box/%s", config.Tag)
resp, err := client.Get(path)
if err != nil || (resp.StatusCode != 200) {
if err != nil {
state.Put("error", fmt.Errorf("Error retrieving box: %s", err))
return multistep.ActionHalt
}
if resp.StatusCode != 200 {
cloudErrors := &VagrantCloudErrors{}
err = decodeBody(resp, cloudErrors)
state.Put("error", fmt.Errorf("Error retrieving box: %s", cloudErrors.FormatErrors()))
......
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