Class AuthenticationException
AuthenticationException represents a runtime exception from authentication.
Implements
Inherited Members
Namespace: Unity.Services.Authentication
Assembly: Unity.Services.Authentication.dll
Syntax
public sealed class AuthenticationException : RequestFailedException, ISerializable
Remarks
See AuthenticationErrorCodes for possible error codes. Consult the service documentation for specific error codes various APIs can return.
Properties
Notifications
Caches the player's notifications if any are available or null if none are available.
Declaration
public List<Notification> Notifications { get; }
Property Value
Type | Description |
---|---|
List<Notification> |
Methods
Create(int, string, Exception)
Creates the exception base on errorCode range. If the errorCode is less than AuthenticationErrorCodes.MinValue it creates a Unity.Services.Core.RequestFailedException. Otherwise it creates an AuthenticationException
Declaration
public static RequestFailedException Create(int errorCode, string message, Exception innerException = null)
Parameters
Type | Name | Description |
---|---|---|
int | errorCode | Gets the error code for the current exception |
string | message | Gets a message that describes the current exception. |
Exception | innerException | Gets the Exception instance that caused the current exception. |
Returns
Type | Description |
---|---|
RequestFailedException | The built exception, either an AuthenticationException or a RequestFailedException |