axmind.com/geoip2/geoip/web-services">the GeoIP2 web service documentation.
If the web service returns an explicit error document, this is thrown as a {@link InvalidRequestException}. If some other sort of transport error occurs, this is thrown as a {@link HttpException}. The difference is that the web service error includes an error message and error code delivered by the web service. The latter is thrown when some sort of unanticipated error occurs, such as the web service returning a 500 or an invalid error document.
If the web service returns any status code besides 200, 4xx, or 5xx, this also becomes a {@link HttpException}.
Finally, if the web service returns a 200 but the body is invalid, the client throws a {@link GeoIp2Exception}.