Use the new Rails error format
This commit is contained in:
parent
2385305f6f
commit
9a575a79ec
|
@ -75,10 +75,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
|
||||
|
||||
|
|
Loading…
Reference in New Issue