made ApiException the base class of the other Exceptions

Makes it easier to do things like catching everything that can go wrong with the API.