Exception: ApiExceptions::NeedAdminError

Inherits:
BaseException
  • Object
show all
Defined in:
app/lib/api_exceptions/need_admin_error.rb

Instance Attribute Summary

Attributes inherited from BaseException

#data, #status

Instance Method Summary collapse

Methods inherited from BaseException

#as_json

Constructor Details

#initialize(message: 'Only the creator of the need or an admin can update it', status: :forbidden) ⇒ NeedAdminError

Returns a new instance of NeedAdminError.



5
6
7
8
# File 'app/lib/api_exceptions/need_admin_error.rb', line 5

def initialize(message: 'Only the creator of the need or an admin can update it', status: :forbidden)
  @data = message
  @status = status
end