public enum VpnError
- Object
- Enum<VpnError>
- VpnError
ImplementsComparable<VpnError>
Typed error codes carried by
VpnException. Branch on these rather than
on the message.Enum constants
NOT_SUPPORTED | VPN management is not available on this port or this OS version. |
USER_DECLINED | The user declined the system prompt that has to precede installing a 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 | The credentials were refused by the server. |
CONNECTION_FAILED | The tunnel could not be established – unreachable server, no network, or a negotiation failure. |
UNAUTHORIZED | The app is missing the entitlement or permission the platform requires. |
NOT_CONFIGURED | No configuration is installed, so there was nothing to act on. |
TIMEOUT | The platform never answered within the safety timeout. |
UNKNOWN | Nothing more specific is known. |
Methods
public static VpnError[] values() | |
public static VpnError valueOf(String name) |
Inherited methods
Enum constant details
NOT_SUPPORTED
NOT_SUPPORTEDVPN 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_DECLINEDThe 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_CONFIGURATIONThe 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_FAILEDThe credentials were refused by the server.
CONNECTION_FAILED
CONNECTION_FAILEDThe tunnel could not be established – unreachable server, no
network, or a negotiation failure.
UNAUTHORIZED
UNAUTHORIZEDThe 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_CONFIGUREDNo configuration is installed, so there was nothing to act on.
TIMEOUT
TIMEOUTThe platform never answered within the safety timeout.
UNKNOWN
UNKNOWNNothing more specific is known.
Method details
values
public static VpnError[] values()valueOf
public static VpnError valueOf(String name)