Exception: GetYourRep::Errors::AddressError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/get_your_rep/errors.rb

Overview

Errors for invalid or inadequate addresses.

Instance Method Summary collapse

Instance Method Details

#invalid_address_typeObject

Raise when the address is not a string or an integer. Supports integers for zip codes.



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

def invalid_address_type
  'Entry must be of types String or Integer'
end

#reps_not_foundObject

Raise when a rep cannot be found with the given parameters.



14
15
16
17
# File 'lib/get_your_rep/errors.rb', line 14

def reps_not_found
  "Error message received. Some reps were not found. Confirm your address and check your parameters. \
Try a full address if you used a zip."
end