Module: Contentstack::ErrorMessages

Defined in:
lib/contentstack/error.rb

Overview

Centralized error messages for the SDK

Constant Summary collapse

API_KEY_INVALID =
"API Key is invalid. Provide a valid API Key and try again."
API_KEY_REQUIRED =
"API Key is required. Provide a valid API Key and try again."
DELIVERY_TOKEN_INVALID =
"Delivery Token is invalid. Provide a valid Delivery Token and try again."
DELIVERY_TOKEN_REQUIRED =
"Delivery Token is required. Provide a valid Delivery Token and try again."
ENVIRONMENT_INVALID =
"Environment is invalid. Provide a valid Environment and try again."
ENVIRONMENT_REQUIRED =
"Environment is required. Provide a valid Environment and try again."
PROXY_URL_REQUIRED =
"Proxy URL is required. Provide a valid Proxy URL and try again."
PROXY_PORT_REQUIRED =
"Proxy Port is required. Provide a valid Proxy Port and try again."

Class Method Summary collapse

Class Method Details

.request_error(error) ⇒ Object



17
18
19
# File 'lib/contentstack/error.rb', line 17

def self.request_error(error)
  "The request encountered an issue due to #{error}. Review the details and try again."
end

.request_failed(response) ⇒ Object



13
14
15
# File 'lib/contentstack/error.rb', line 13

def self.request_failed(response)
  "The request could not be completed due to #{response}. Review the details and try again."
end