additional checks in sql call for 404 status

Adding extra check to help diagnose issue when invalid url is used to instantiate the client class