Exception: Prefab::Errors::InvalidApiKeyError
- Inherits:
-
Prefab::Error
- Object
- StandardError
- Prefab::Error
- Prefab::Errors::InvalidApiKeyError
- Defined in:
- lib/prefab/errors/invalid_api_key_error.rb
Instance Method Summary collapse
-
#initialize(key) ⇒ InvalidApiKeyError
constructor
A new instance of InvalidApiKeyError.
Constructor Details
#initialize(key) ⇒ InvalidApiKeyError
Returns a new instance of InvalidApiKeyError.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/prefab/errors/invalid_api_key_error.rb', line 6 def initialize(key) if key.nil? || key.empty? = 'No API key. Set PREFAB_API_KEY env var or use PREFAB_DATASOURCES=LOCAL_ONLY' super() else = "Your API key format is invalid. Expecting something like 123-development-yourapikey-SDK. You provided `#{key}`" super() end end |