Exception: Basecamp::Oauth::Fetcher::SkipBody

Inherits:
StandardError
  • Object
show all
Defined in:
lib/basecamp/oauth/fetcher.rb

Overview

Raised from on_data to STOP reading a response whose body the caller does not use (a non-2xx device-auth, a 3xx token redirect). Draining such a slow body would otherwise time out and be misclassified as a transport failure. Carries the response status so the caller can classify by it; like the markers above it crosses the module boundary raw and is mapped there.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ SkipBody

Returns a new instance of SkipBody.



153
154
155
156
# File 'lib/basecamp/oauth/fetcher.rb', line 153

def initialize(status)
  @status = status
  super("device flow response body skipped for status #{status}")
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



151
152
153
# File 'lib/basecamp/oauth/fetcher.rb', line 151

def status
  @status
end