Exception: TrueTrial::AuthenticationError

Inherits:
Error
  • Object
show all
Defined in:
lib/truetrial/errors.rb

Overview

Raised when the API key is missing or invalid (HTTP 401).

Instance Attribute Summary

Attributes inherited from Error

#response_body, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "Invalid or missing API key", response_body: nil) ⇒ AuthenticationError

Returns a new instance of AuthenticationError.



17
18
19
# File 'lib/truetrial/errors.rb', line 17

def initialize(message = "Invalid or missing API key", response_body: nil)
  super(message, status_code: 401, response_body: response_body)
end