Exception: ContentGateway::ValidationError
- Defined in:
- lib/content_gateway/exceptions.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from BaseError
#info, #resource_url, #status_code, #wrapped_exception
Instance Method Summary collapse
-
#initialize(resource_url, wrapped_exception = nil) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(resource_url, wrapped_exception = nil) ⇒ ValidationError
Returns a new instance of ValidationError.
56 57 58 59 60 61 62 63 |
# File 'lib/content_gateway/exceptions.rb', line 56 def initialize(resource_url, wrapped_exception = nil) super(resource_url, wrapped_exception, 422) if wrapped_exception response = wrapped_exception.response @errors = JSON.parse(response) if response.present? end end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
54 55 56 |
# File 'lib/content_gateway/exceptions.rb', line 54 def errors @errors end |