Exception: MediawikiApi::HttpError

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

Overview

for errors from HTTP requests

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ HttpError


40
41
42
# File 'lib/mediawiki_api/exceptions.rb', line 40

def initialize(status)
  @status = status
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status


38
39
40
# File 'lib/mediawiki_api/exceptions.rb', line 38

def status
  @status
end

Instance Method Details

#to_sObject


44
45
46
# File 'lib/mediawiki_api/exceptions.rb', line 44

def to_s
  "unexpected HTTP response (#{status})"
end