Exception: Gitlab::Git::ResourceExhaustedError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/gitlab/git.rb

Constant Summary

Constants inherited from BaseError

BaseError::DEBUG_ERROR_STRING_REGEX, BaseError::GRPC_CODES, BaseError::METADATA_KEY

Instance Attribute Summary

Attributes inherited from BaseError

#code, #metadata, #service, #status

Instance Method Summary collapse

Methods inherited from BaseError

#build_raw_message, #set_grpc_error_code, #set_grpc_error_metadata

Constructor Details

#initialize(msg = nil, retry_after = 0) ⇒ ResourceExhaustedError

Returns a new instance of ResourceExhaustedError.



27
28
29
30
# File 'lib/gitlab/git.rb', line 27

def initialize(msg = nil, retry_after = 0)
  super(msg)
  @retry_after = retry_after
end

Instance Method Details

#headersObject



32
33
34
35
36
37
38
# File 'lib/gitlab/git.rb', line 32

def headers
  if @retry_after.to_i > 0
    { "Retry-After" => @retry_after }
  else
    {}
  end
end