Exception: TsJsonApi::AccessTokenRefused

Inherits:
Exception
  • Object
show all
Defined in:
lib/ts_json_api/exceptions.rb

Overview

This exception is thrown when we aren’t authorized to access the server

Instance Attribute Summary

Attributes inherited from Exception

#http_code, #message, #rest_client_exception

Instance Method Summary collapse

Methods inherited from Exception

#to_s

Constructor Details

#initialize(*args) ⇒ AccessTokenRefused

Returns a new instance of AccessTokenRefused.



38
39
40
41
42
43
# File 'lib/ts_json_api/exceptions.rb', line 38

def initialize(*args)
	options = args.extract_options!
	options.merge! http_code: 401
	super options
	self.message = 'Access token refused'
end