﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26435	GeoIP2 return raw exception from geoip2 package	Maxim Filipenko	nobody	"Hi!

When using `django.contrib.gis.geoip2` I have to deal with exceptions from `django.contrib.gis.geoip2` itself and also from underlying package [https://pypi.python.org/pypi/geoip2 geoip2]. And because of that, for error handling I should include two imports in my source file:
{{{
...
from django.contrib.gis.geoip2 import GeoIP2, GeoIP2Exception
from geoip2.errors import AddressNotFoundError
...
g = GeoIP2()
try:
    res = g.city(some_ip)
except (AddressNotFoundError, GeoIP2Exception) as e:
   # do something
   pass
}}}

It breaks abstraction, because I want to deal only with errors from my gis-component, I don't want to know what exactly underlying package and which errors it can throw.

Maybe `GeoIP2Exception` should be expanded and thereby `django.contrib.gis.geoip2` will not throw underlying package exceptions, because I consider the `AddressNotFoundError` exception as very basic scenario and it's absolutely should be handled in my code.

Thanks!"	Cleanup/optimization	closed	GIS	1.9	Normal	wontfix	geoip2, GeoIP2Exception		Unreviewed	0	0	0	0	1	0
