Skip to main content
Version: SDK-5.11.4

IsServerError

public bool IsServerError();

Description

When the server is temporarily overloaded or 500, 502, and 503 errors that do not appear in normal situations occur, 'true' is returned.

The included error cases are as follows:

When the server is temporarily overloaded
statusCode : 500
errorCode : InternalServerError
message: {"message":"Request failed with status code 502"} or {"message":"Request failed with status code 504"}

When the server is temporarily overloaded
statusCode : 502
errorCode : BadGateway
message : 502 Bad Gateway

When the request takes a long time
statusCode : 503
errorCode : ETIMEDOUT
message : Response timeout

When the server is not working properly
statusCode : 503
errorCode : Service Temporarily Unavailable
message : 503 Service Temporarily Unavailable

The error may occur when the user inflow suddenly increases. The issue is likely to be resolved when the same method is called 30 or 60 seconds later.

Example

BackendReturnObject bro = Backend.GameData.Get("tableName", new Where());

if(bro.IsSuccess())
{
}
else
{
if(bro.IsServerError())
{
Debug.Log("Occurs when the server is overloaded or unstable.");
}
}