|
|
|
@ -13,10 +13,10 @@ class UprnClient |
|
|
|
|
|
|
|
|
|
|
|
def call |
|
|
|
def call |
|
|
|
unless response.is_a?(Net::HTTPSuccess) && result.present? |
|
|
|
unless response.is_a?(Net::HTTPSuccess) && result.present? |
|
|
|
@error = "UPRN is not recognised. Check the number, or enter the address" |
|
|
|
@error = "UPRN is not recognised. Check the number, or enter the address." |
|
|
|
end |
|
|
|
end |
|
|
|
rescue JSON::ParserError |
|
|
|
rescue JSON::ParserError |
|
|
|
@error = "UPRN is not recognised. Check the number, or enter the address" |
|
|
|
@error = "UPRN is not recognised. Check the number, or enter the address." |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def result |
|
|
|
def result |
|
|
|
|