Exception: Gitlab::Error::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/gitlab/error.rb

Overview

Custom error class for rescuing from HTTP response errors.

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResponseError

Returns a new instance of ResponseError.



14
15
16
17
# File 'lib/gitlab/error.rb', line 14

def initialize(response)
  @response = response
  super(build_error_message)
end

Instance Method Details

#response_statusInteger

Status code returned in the http response.

Returns:

  • (Integer)


22
23
24
# File 'lib/gitlab/error.rb', line 22

def response_status
  @response.code
end