Exception: Pictify::RenderError

Inherits:
Error
  • Object
show all
Defined in:
lib/pictify/errors.rb

Overview

Raised when a render fails or input validation fails (HTTP 422, and other non-quota 4xx). Carries field-level errors from the API when present.

Instance Attribute Summary collapse

Attributes inherited from Error

#response_body, #status_code

Instance Method Summary collapse

Methods inherited from Error

#message, #to_s

Constructor Details

#initialize(message = nil, errors: nil, **kwargs) ⇒ RenderError

Returns a new instance of RenderError.



87
88
89
90
# File 'lib/pictify/errors.rb', line 87

def initialize(message = nil, errors: nil, **kwargs)
  @errors = errors
  super(message, **kwargs)
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



85
86
87
# File 'lib/pictify/errors.rb', line 85

def errors
  @errors
end