delete the session if an error occurs during upload