Exception: JSONAPI::Exceptions::ToManySetReplacementForbidden

Inherits:
Error
  • Object
show all
Defined in:
lib/jsonapi/exceptions.rb

Instance Attribute Summary

Attributes inherited from Error

#error_object_overrides

Instance Method Summary collapse

Methods inherited from Error

#create_error_object, #initialize

Constructor Details

This class inherits a constructor from JSONAPI::Exceptions::Error

Instance Method Details

#errorsObject



172
173
174
175
176
177
178
179
# File 'lib/jsonapi/exceptions.rb', line 172

def errors
  [create_error_object(code: JSONAPI::FORBIDDEN,
                       status: :forbidden,
                       title: I18n.translate('jsonapi-resources.exceptions.to_many_set_replacement_forbidden.title',
                                             default: 'Complete replacement forbidden'),
                       detail: I18n.translate('jsonapi-resources.exceptions.to_many_set_replacement_forbidden.detail',
                                              default: 'Complete replacement forbidden for this relationship'))]
end