Exception: WPScan::HTTPError
- Inherits:
-
StandardError
- Object
- StandardError
- WPScan::HTTPError
- Defined in:
- lib/wpscan/errors/http.rb
Overview
HTTP Error
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #failure_details ⇒ Object
-
#initialize(response) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ HTTPError
Returns a new instance of HTTPError.
7 8 9 |
# File 'lib/wpscan/errors/http.rb', line 7 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/wpscan/errors/http.rb', line 4 def response @response end |
Instance Method Details
#failure_details ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/wpscan/errors/http.rb', line 11 def failure_details msg = response.effective_url msg += if response.code.zero? || response.timed_out? " (#{response.})" else " (status: #{response.code})" end msg end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/wpscan/errors/http.rb', line 23 def to_s "HTTP Error: #{failure_details}" end |