Exception: Graphiti::Errors::SideloadQueryBuildingError

Inherits:
Base
  • Object
show all
Defined in:
lib/graphiti/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource_class, sideload_name) ⇒ SideloadQueryBuildingError

Returns a new instance of SideloadQueryBuildingError.



259
260
261
262
# File 'lib/graphiti/errors.rb', line 259

def initialize(resource_class, sideload_name)
  @resource_class = resource_class
  @sideload_name = sideload_name
end

Instance Method Details

#messageObject



264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/graphiti/errors.rb', line 264

def message
  "    \#{@resource_class.name}: error occurred while sideloading \"\#{@sideload_name}\"!\n\n    The error was raised while attempting to build the scope for the associated Resource.\n\n    Read more about sideload scoping here: www.graphiti.dev/guides/concepts/resources#customizing-scope\n\n    Here's the original, underlying error:\n\n    \#{cause.class.name}: \#{cause.message}\n    \#{cause.backtrace.join(\"\\n\")}\n  MSG\nend\n"