Exception: RestApiClient::UnauthorizedException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rest/api/exceptions/unauthorized_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ UnauthorizedException

Returns a new instance of UnauthorizedException.



6
7
8
9
# File 'lib/rest/api/exceptions/unauthorized_exception.rb', line 6

def initialize(errors)
  super 'You are not allowed to perform this action. Maybe you forgot to pass the authorization token?'
  @errors = (errors && errors.is_a?(Array)) ? errors.uniq : errors
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



4
5
6
# File 'lib/rest/api/exceptions/unauthorized_exception.rb', line 4

def errors
  @errors
end