Skip to main content
Version: 5.11.8

OnDeviceBlockError

Description

This handler is automatically called when a device is added as a blocked device in BACKND Console -> Game Access Management -> Access Block.
The handler is called when the following error is returned:

When the device is blocked
statusCode : 403
errorCode : ForbiddenException

Example

Main thread

void Start() {
if(Backend.IsInitialized) {
Backend.ErrorHandler.InitializePoll(true);

Backend.ErrorHandler.OnDeviceBlockError= () => {
Debug.Log("Device block occurred");
gameObject.GetComponentInChildren<Text>().text = "The device has been blocked.";
};
}
}

void Update() {
if(Backend.ErrorHandler.UseAsyncQueuePoll) {
Backend.ErrorHandler.Poll();
}
}

External thread

void Start() {
Backend.ErrorHandler.OnDeviceBlockError= () => {
Debug.Log("Device block occurred!");
};
}