throw InvalidArgumentException instead of BaseException
make BaseException abstract to ensure it is never thrown directly
added InvalidResponseException which is thrown whenever a response is
invalid