Skip to content

Fail-fast on IP addresses that will always return AddressNotFoundException #108

Open
@davidklebanoff

Description

@davidklebanoff

There are certain IP addresses that will always result in an AddressNotFoundException such as those in private address spaces (e.g. 10.0.0.0 – 10.255.255.255).

It would be nice if the client checked and returned an AddressNotFoundException (or perhaps a new child class such as PrivateAddressException) instead hitting the API, resulting in wasted time on wire and use of API credits.

I'm not sure what the full set of reserved/private and otherwise hardcoded "bad" ip ranges would be, but a good start would be to do a quick call such as ip.isAnyLocalAddress() before calling out to the MaxMind API.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions