Skip to main content
Version: 5.15.0

OnTooManyRequestError

Description

This handler is called automatically and restricts requests from the server when excessive requests are sent, such as in the case of making at least 1 call per second.
When excessive requests are detected, making requests becomes available after 5 minutes and 30 seconds.

The handler is called when the following error is returned:

When too many requests are sent from one client (same IP)
statusCode : 403
errorCode : Forbidden
message : 403 Forbidden

Example

Main thread

void Start() {
if(Backend.IsInitialized) {
Backend.ErrorHandler.OnTooManyRequestError = () => {
Debug.Log("403 error occurred!!!");
gameObject.GetComponentInChildren<Text>().text = "Excessive requests detected.";
};
}
}