Exception: Request::CloudflareBlockedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/Request.rb

Overview

Raised when Medium’s Cloudflare layer blocks the request (typically the “Just a moment…” challenge page). Carries enough context for the CLI to print actionable cookie-setup guidance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_code, url) ⇒ CloudflareBlockedError

Returns a new instance of CloudflareBlockedError.



11
12
13
14
15
# File 'lib/Request.rb', line 11

def initialize(http_code, url)
    @http_code = http_code
    @url = url
    super(buildMessage)
end

Instance Attribute Details

#http_codeObject (readonly)

Returns the value of attribute http_code.



9
10
11
# File 'lib/Request.rb', line 9

def http_code
  @http_code
end

#urlObject (readonly)

Returns the value of attribute url.



9
10
11
# File 'lib/Request.rb', line 9

def url
  @url
end