Exception: ThreeScale::Backend::UsageValueInvalid
- Defined in:
- lib/3scale/backend/errors.rb
Instance Method Summary collapse
-
#initialize(metric_name, value) ⇒ UsageValueInvalid
constructor
A new instance of UsageValueInvalid.
Methods inherited from Error
#code, code, #http_code, #to_xml, underscore
Constructor Details
#initialize(metric_name, value) ⇒ UsageValueInvalid
Returns a new instance of UsageValueInvalid.
156 157 158 159 160 161 162 |
# File 'lib/3scale/backend/errors.rb', line 156 def initialize(metric_name, value) if !value.is_a?(String) || value.blank? super %(usage value for metric "#{metric_name}" can not be empty) else super %(usage value "#{value}" for metric "#{metric_name}" is invalid) end end |