Exception: JPie::Errors::UnsupportedIncludeError

Inherits:
BadRequestError show all
Defined in:
lib/jpie/errors.rb

Instance Attribute Summary

Attributes inherited from Error

#code, #detail, #source, #status, #title

Instance Method Summary collapse

Methods inherited from Error

#to_hash

Constructor Details

#initialize(include_path:, supported_includes: []) ⇒ UnsupportedIncludeError

Returns a new instance of UnsupportedIncludeError.



84
85
86
87
88
89
90
91
# File 'lib/jpie/errors.rb', line 84

def initialize(include_path:, supported_includes: [])
  detail = if supported_includes.any?
             "Unsupported include '#{include_path}'. Supported includes: #{supported_includes.join(', ')}"
           else
             "Unsupported include '#{include_path}'. No includes are supported for this resource"
           end
  super(detail: detail)
end