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.



36
37
38
39
# File 'lib/gitlab/git.rb', line 36

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

Instance Method Details

#headersObject



41
42
43
44
45
46
47
# File 'lib/gitlab/git.rb', line 41

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