Use the new Rails error format

This commit is contained in:
Seth Vargo 2014-12-11 01:21:46 -08:00
parent 2385305f6f
commit 9a575a79ec
1 changed files with 1 additions and 4 deletions

View File

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