change exceptions.py from API to service module