Skip to main content
Version: 6.0.0

OnTooManyRequestByLocalError

Description

This handler is called automatically when requests are sent even after being restricted from the server due to excessive requests, such as making at least 1 call per second.
The handler is called when the following error is returned:

When excessive requests continue
statusCode : 403
errorCode : Forbidden

Example

Main thread

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

Backnd.ErrorHandler.OnTooManyRequestByLocalError = () => {
Debug.Log("403 local error occurred!!!");
gameObject.GetComponentInChildren<Text>().text = "Excessive requests.";
};
}
}

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

External thread

void Start() {
Backnd.ErrorHandler.OnTooManyRequestByLocalError = () => {
Debug.Log("403 local error occurred!!!");
};
}