added null client and quota error catch