throw an error only session !=0