Exception: Poncho::ValidationError

Inherits:
ClientError show all
Defined in:
lib/poncho/error.rb

Instance Attribute Summary collapse

Attributes inherited from ClientError

#message, #type

Instance Method Summary collapse

Methods inherited from Error

#to_json, #type

Constructor Details

#initialize(errors) ⇒ ValidationError

Returns a new instance of ValidationError.



53
54
55
# File 'lib/poncho/error.rb', line 53

def initialize(errors)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



51
52
53
# File 'lib/poncho/error.rb', line 51

def errors
  @errors
end

Instance Method Details

#as_jsonObject



61
62
63
# File 'lib/poncho/error.rb', line 61

def as_json
  errors
end

#codeObject



57
58
59
# File 'lib/poncho/error.rb', line 57

def code
  400
end