Exception: Graphiti::Errors::SideloadAssignError
- Defined in:
- lib/graphiti/errors.rb
Instance Method Summary collapse
-
#initialize(resource_class, sideload_name) ⇒ SideloadAssignError
constructor
A new instance of SideloadAssignError.
- #message ⇒ Object
Constructor Details
#initialize(resource_class, sideload_name) ⇒ SideloadAssignError
Returns a new instance of SideloadAssignError.
306 307 308 309 |
# File 'lib/graphiti/errors.rb', line 306 def initialize(resource_class, sideload_name) @resource_class = resource_class @sideload_name = sideload_name end |
Instance Method Details
#message ⇒ Object
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/graphiti/errors.rb', line 311 def <<-MSG #{@resource_class.name}: error occurred while sideloading "#{@sideload_name}"! The error was raised while attempting to assign relevant model instances. Read more about sideload assignment here: www.graphiti.dev/guides/concepts/resources#customizing-assignment A good way to debug is to put a debugger within the 'assign' block. Here's the original, underlying error: #{cause.class.name}: #{cause.} #{cause.backtrace.join("\n")} MSG end |