Better facebook error detection and handling