Error handling in get all policy instance api