express42 / packer-builder-selectel

3 stars 1 forks source link

Make log more useful #5

Open vitkhab opened 7 years ago

vitkhab commented 7 years ago

I used incorrect value for ssh_keypair_name and all I was getting in log was

==> selectel: Error launching source server: Invalid request due to incorrect syntax or missing required parameters.

After I looked into communication with api I caught response

{
    "badRequest": {
        "code": 400,
        "message": "Invalid key_name provided."
    }
}
vitkhab commented 7 years ago

This is behaviour implemented in gophercloud https://github.com/gophercloud/gophercloud/blob/master/errors.go#L105-L107

Proposed solutions: