Handle rest client exceptions