Exception: InvisibleCollector::Unauthorized

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/invisible_collector/unauthorized.rb

Class Method Summary collapse

Class Method Details

.from_json(json) ⇒ Object



5
6
7
8
9
10
# File 'lib/invisible_collector/unauthorized.rb', line 5

def self.from_json(json)
  message = JSON.parse(json)
  code = message['code']
  message = message['message']
  new "#{code}: #{message}"
end