Merge pull request #4937 from mitchellh/sethvargo/error_format

Use the new Rails error format
This commit is contained in:
Seth Vargo 2014-12-11 16:54:45 -08:00
commit 6596f7f29d
1 changed files with 1 additions and 4 deletions

View File

@ -83,10 +83,7 @@ module VagrantPlugins
false
rescue RestClient::NotAcceptable => e
begin
errors = JSON.parse(e.response)["errors"]
.map { |h| h["message"] }
.join("\n")
errors = JSON.parse(e.response)["errors"].join("\n")
raise Errors::ServerError, errors: errors
rescue JSON::ParserError; end