diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index 3cdd44d898..6af0f350fe 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -791,12 +791,14 @@ extension Pixel.Event { case .networkProtectionTunnelConfigurationCouldNotSelectClosestServer: return "m_netp_tunnel_config_error_could_not_select_closest_server" case .networkProtectionTunnelConfigurationCouldNotGetPeerPublicKey: return "m_netp_tunnel_config_error_could_not_get_peer_public_key" case .networkProtectionTunnelConfigurationCouldNotGetPeerHostName: return "m_netp_tunnel_config_error_could_not_get_peer_host_name" - case .networkProtectionTunnelConfigurationCouldNotGetInterfaceAddressRange: return "m_netp_tunnel_config_error_could_not_get_interface_address_range" + case .networkProtectionTunnelConfigurationCouldNotGetInterfaceAddressRange: + return "m_netp_tunnel_config_error_could_not_get_interface_address_range" case .networkProtectionClientFailedToFetchServerList: return "m_netp_backend_api_error_failed_to_fetch_server_list" case .networkProtectionClientFailedToParseServerListResponse: return "m_netp_backend_api_error_parsing_server_list_response_failed" case .networkProtectionClientFailedToEncodeRegisterKeyRequest: return "m_netp_backend_api_error_encoding_register_request_body_failed" case .networkProtectionClientFailedToFetchRegisteredServers: return "m_netp_backend_api_error_failed_to_fetch_registered_servers" - case .networkProtectionClientFailedToParseRegisteredServersResponse: return "m_netp_backend_api_error_parsing_device_registration_response_failed" + case .networkProtectionClientFailedToParseRegisteredServersResponse: + return "m_netp_backend_api_error_parsing_device_registration_response_failed" case .networkProtectionClientFailedToEncodeRedeemRequest: return "m_netp_backend_api_error_encoding_redeem_request_body_failed" case .networkProtectionClientInvalidInviteCode: return "m_netp_backend_api_error_invalid_invite_code" case .networkProtectionClientFailedToRedeemInviteCode: return "m_netp_backend_api_error_failed_to_redeem_invite_code" diff --git a/DuckDuckGo/EventMapping+NetworkProtectionError.swift b/DuckDuckGo/EventMapping+NetworkProtectionError.swift index 8f050069d2..a131d64443 100644 --- a/DuckDuckGo/EventMapping+NetworkProtectionError.swift +++ b/DuckDuckGo/EventMapping+NetworkProtectionError.swift @@ -1,5 +1,6 @@ // // EventMapping+NetworkProtectionError.swift +// DuckDuckGo // // Copyright © 2023 DuckDuckGo. All rights reserved. // diff --git a/PacketTunnelProvider/NetworkProtectionPacketTunnelProvider.swift b/PacketTunnelProvider/NetworkProtectionPacketTunnelProvider.swift index 7cfbc1c452..c384c17328 100644 --- a/PacketTunnelProvider/NetworkProtectionPacketTunnelProvider.swift +++ b/PacketTunnelProvider/NetworkProtectionPacketTunnelProvider.swift @@ -140,7 +140,9 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider { public override func startTunnel(options: [String: NSObject]?, completionHandler: @escaping (Error?) -> Void) { super.startTunnel(options: options) { error in - DailyPixel.fireDailyAndCount(pixel: .networkProtectionFailedToStartTunnel, error: error) + if error != nil { + DailyPixel.fireDailyAndCount(pixel: .networkProtectionFailedToStartTunnel, error: error) + } completionHandler(error) } }