Exception: BitBucket::Error::ServiceError
- Inherits:
-
BitBucketError
- Object
- StandardError
- BitBucketError
- BitBucket::Error::ServiceError
- Defined in:
- lib/bitbucket_rest_api/error/service_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http_headers ⇒ Object
Returns the value of attribute http_headers.
Attributes inherited from BitBucketError
#response_headers, #response_message
Instance Method Summary collapse
- #generate_message(env) ⇒ Object
-
#initialize(env) ⇒ ServiceError
constructor
A new instance of ServiceError.
Constructor Details
#initialize(env) ⇒ ServiceError
Returns a new instance of ServiceError.
9 10 11 12 |
# File 'lib/bitbucket_rest_api/error/service_error.rb', line 9 def initialize(env) super((env)) @http_headers = env[:response_headers] end |
Instance Attribute Details
#http_headers ⇒ Object
Returns the value of attribute http_headers.
7 8 9 |
# File 'lib/bitbucket_rest_api/error/service_error.rb', line 7 def http_headers @http_headers end |
Instance Method Details
#generate_message(env) ⇒ Object
14 15 16 |
# File 'lib/bitbucket_rest_api/error/service_error.rb', line 14 def (env) "#{env[:method].to_s.upcase} #{env[:url].to_s}: #{env[:status]} #{env[:body]}" end |