class ActionKitRest::Response::ValidationError
Attributes
body[RW]
errors[RW]
url[RW]
Public Class Methods
new(params)
click to toggle source
Calls superclass method
# File lib/action_kit_rest/response/validation_error.rb, line 8 def initialize(params) self.url = params[:url] self.body = params[:body].dup self.errors = JSON.parse(params[:body])['errors'] super() end
Public Instance Methods
to_s()
click to toggle source
Calls superclass method
# File lib/action_kit_rest/response/validation_error.rb, line 15 def to_s "#{super()} \n url: #{url} \n body: #{body.force_encoding('UTF-8')} \n errors: #{errors}" rescue Encoding::CompatibilityError # Something went gravely wrong trying to construct the error message, so give up on the extra info # and just raise the name of the exception. # This will let us at least raise with a backtrace. super end