lib/geonames_api/error.rb in geonames_api-0.1.2 vs lib/geonames_api/error.rb in geonames_api-0.1.3

- old
+ new

@@ -21,11 +21,12 @@ end class RecordDoesNotExist < Error ERROR_CODES = [11] end class Timeout < Error - ERROR_CODES = [13, 22] + # 12 is "other error", but is normally "Cannot get a connection, pool error Timeout waiting for idle object" + ERROR_CODES = [12, 13, 22] end class InvalidParameter < Error ERROR_CODES = [14] end class NoResultFound < Error @@ -35,16 +36,19 @@ ERROR_CODES = [16] end class PostalCodeNotFound < Error ERROR_CODES = [17] end - class DailyLimitExceeded < Error + class LimitExceeded < Error + ERROR_CODES = [] + end + class DailyLimitExceeded < LimitExceeded ERROR_CODES = [18] end - class HourlyLimitExceeded < Error + class HourlyLimitExceeded < LimitExceeded ERROR_CODES = [19] end - class WeeklyLimitExceeded < Error + class WeeklyLimitExceeded < LimitExceeded ERROR_CODES = [20] end class ServiceNotImplemented < Error ERROR_CODES = [23] end