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.
8 9 10 11 |
# File 'lib/bitbucket_rest_api/error/service_error.rb', line 8 def initialize(env) super((env)) @http_headers = env[:response_headers] end |
Instance Attribute Details
#http_headers ⇒ Object
Returns the value of attribute http_headers.
6 7 8 |
# File 'lib/bitbucket_rest_api/error/service_error.rb', line 6 def http_headers @http_headers end |
Instance Method Details
#generate_message(env) ⇒ Object
13 14 15 |
# File 'lib/bitbucket_rest_api/error/service_error.rb', line 13 def (env) "#{env[:method].to_s.upcase} #{env[:url]}: #{env[:status]} #{env[:body]}" end |