Exception: Apimaster::AlreadyExistsError

Inherits:
NormalError
  • Object
show all
Defined in:
lib/apimaster/error.rb

Instance Attribute Summary

Attributes inherited from NormalError

#code, #error, #field, #resource

Instance Method Summary collapse

Constructor Details

#initialize(resource = nil, field = nil) ⇒ AlreadyExistsError

Returns a new instance of AlreadyExistsError.



44
45
46
# File 'lib/apimaster/error.rb', line 44

def initialize(resource = nil, field = nil)
  super("Another resource '#{resource}' has the same value as this field '#{field}'. ", 409, :already_exists, resource, field)
end