Exception: TflApi::Exceptions::Unauthorized

Inherits:
ApiException
  • Object
show all
Defined in:
lib/tfl_api_client/exceptions.rb

Overview

This exception class handles cases where invalid credentials are provided to connect to the TFL API.

Instance Method Summary collapse

Constructor Details

#initialize(logger, message = '') ⇒ Unauthorized

Returns a new instance of Unauthorized.



44
45
46
47
# File 'lib/tfl_api_client/exceptions.rb', line 44

def initialize(logger, message = '')
  message = 'Access denied. Please ensure you have valid TFL credentials.' if message.nil? || message.empty?
  super(logger, message)
end