Exception: BitBucket::Error::UnknownValue

Inherits:
ClientError show all
Defined in:
lib/bitbucket_rest_api/error/unknown_value.rb

Instance Attribute Summary

Attributes inherited from ClientError

#problem, #resolution, #summary

Attributes inherited from BitBucketError

#response_headers, #response_message

Instance Method Summary collapse

Methods inherited from ClientError

#generate_message

Constructor Details

#initialize(key, value, permitted) ⇒ UnknownValue

Returns a new instance of UnknownValue.



6
7
8
9
10
11
12
13
14
# File 'lib/bitbucket_rest_api/error/unknown_value.rb', line 6

def initialize(key, value, permitted)
  super(
    generate_message(
      problem: "Wrong value of '#{value}' for the parameter: #{key} provided for this request.",
      summary: 'BitBucket gem checks the request parameters passed to ensure that github api is not hit unnecessairly and fails fast.',
      resolution: "Permitted values are: #{permitted}, make sure these are the ones you are using"
    )
  )
end