Method: Mindee::HTTP::WorkflowEndpoint#check_api_key

Defined in:
lib/mindee/http/workflow_endpoint.rb

#check_api_keyObject

Checks API key



81
82
83
84
85
86
87
# File 'lib/mindee/http/workflow_endpoint.rb', line 81

def check_api_key
  return unless @api_key.nil? || @api_key.empty?

  raise Errors::MindeeConfigurationError, "Missing API key. Check your Client Configuration.\n" \
                                          "You can set this using the '#{HTTP::API_KEY_ENV_NAME}'" \
                                          'environment variable.'
end