Class: Readme::Errors
- Inherits:
-
Object
- Object
- Readme::Errors
- Defined in:
- lib/readme/errors.rb
Defined Under Namespace
Classes: ConfigurationError
Constant Summary collapse
- API_KEY_ERROR =
'Missing API Key'- REJECT_PARAMS_ERROR =
'The `reject_params` option must be an array of strings'- ALLOW_ONLY_ERROR =
'The `allow_only` option must be an array of strings'- BUFFER_LENGTH_ERROR =
'The `buffer_length` must be an Integer'- DEVELOPMENT_ERROR =
'The `development` option must be a boolean'- LOGGER_ERROR =
"The `logger` option must be class that responds to the following messages:\n :unkown, :fatal, :error, :warn, :info, :debug, :level\n"- MISSING_BLOCK_ERROR =
"Missing block argument. You must provide a block when configuring the\nmiddleware. The block must return a hash containing user info:\n use Readme::Metrics, options do |env|\n { id: \"unique_id\", label: \"Your user label\", email: \"Your user email\" }\n end\n"
Class Method Summary collapse
Class Method Details
.bad_block_message(result) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/readme/errors.rb', line 23 def self.(result) " The request could not be sent to Readme. Something went wrong when\n setting user info. Double check the block configured on the ReadMe\n middleware.\n\n Expected a hash with the shape:\n { api_key: \"Your user api key\", label: \"Your user label\", email: \"Your user email\" }\n\n Received value:\n \#{result}\n MESSAGE\nend\n" |