Exception: Exceptions::UnauthorizedApplication

Inherits:
Base
  • Object
show all
Defined in:
lib/exceptions/unauthorized_application.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#object, #type

Instance Method Summary collapse

Methods inherited from Base

build, #initialize, #model?, #simple?

Constructor Details

This class inherits a constructor from Exceptions::Base

Instance Attribute Details

#statusObject

return the error status



24
25
26
# File 'lib/exceptions/unauthorized_application.rb', line 24

def status
  @status
end

Instance Method Details

#errorString

for standard errors this method build a hash

Returns:

  • (String)

    json string



9
10
11
12
13
14
15
# File 'lib/exceptions/unauthorized_application.rb', line 9

def error
	{ 
		error: { 
			message: self.object[:message]
		} 
	}
end

#messageString

return the error message

Returns:

  • (String)


19
20
21
# File 'lib/exceptions/unauthorized_application.rb', line 19

def message
	self.object[:message]
end