public enum VpnError

  1. Object
  2. Enum<VpnError>
  3. VpnError

ImplementsComparable<VpnError>

Typed error codes carried by VpnException. Branch on these rather than on the message.

Enum constants

NOT_SUPPORTEDVPN management is not available on this port or this OS version.
USER_DECLINEDThe user declined the system prompt that has to precede installing a configuration.
INVALID_CONFIGURATIONThe configuration was rejected: a malformed server address, an authentication method the platform does not offer, or a certificate it could not read.
AUTHENTICATION_FAILEDThe credentials were refused by the server.
CONNECTION_FAILEDThe tunnel could not be established – unreachable server, no network, or a negotiation failure.
UNAUTHORIZEDThe app is missing the entitlement or permission the platform requires.
NOT_CONFIGUREDNo configuration is installed, so there was nothing to act on.
TIMEOUTThe platform never answered within the safety timeout.
UNKNOWNNothing more specific is known.

Methods

public static VpnError[] values()
public static VpnError valueOf(String name)

Inherited methods

Enum constant details

NOT_SUPPORTED

NOT_SUPPORTED
VPN management is not available on this port or this OS version. Android needs API 30 for the managed profile API; the desktop and browser ports have no equivalent at all.

USER_DECLINED

USER_DECLINED
The user declined the system prompt that has to precede installing a configuration. Both platforms show one, and neither lets an app install a VPN without it.

INVALID_CONFIGURATION

INVALID_CONFIGURATION
The configuration was rejected: a malformed server address, an authentication method the platform does not offer, or a certificate it could not read.

AUTHENTICATION_FAILED

AUTHENTICATION_FAILED
The credentials were refused by the server.

CONNECTION_FAILED

CONNECTION_FAILED
The tunnel could not be established – unreachable server, no network, or a negotiation failure.

UNAUTHORIZED

UNAUTHORIZED
The app is missing the entitlement or permission the platform requires. On iOS this usually means the Personal VPN capability is not enabled on the App ID.

NOT_CONFIGURED

NOT_CONFIGURED
No configuration is installed, so there was nothing to act on.

TIMEOUT

TIMEOUT
The platform never answered within the safety timeout.

UNKNOWN

UNKNOWN
Nothing more specific is known.

Method details

values

public static VpnError[] values()

valueOf

public static VpnError valueOf(String name)