Skip to main content

PlayerFaultCode

What a player-facing surface may be told about a failure that came from code the platform did not write. Deliberately coarser than the internal fault taxonomy: it says what a player can act on and never names an engine, a module, a function or a limit. The full detail is in the developer surfaces (gameModelEvents, computeModuleRuns, userCodeFaults).

enum PlayerFaultCode {
USER_CODE_ERROR
USER_CODE_TOO_SLOW
USER_CODE_LIMIT_EXCEEDED
PLATFORM_BUSY
PLATFORM_ERROR
BUDGET_EXCEEDED
RATE_LIMITED
QUOTA_EXHAUSTED
WALLET_EMPTY
SPEND_CAP_REACHED
TEMPORARILY_DISABLED
INVALID_REQUEST
NOT_ALLOWED
NOT_FOUND
UNAUTHENTICATED
WRONG_DATACENTER
APP_UNAVAILABLE
}

Values

PlayerFaultCode.USER_CODE_ERROR

The app's own code failed while running.

PlayerFaultCode.USER_CODE_TOO_SLOW

The app's own code ran past the time it is allowed.

PlayerFaultCode.USER_CODE_LIMIT_EXCEEDED

The app's own code exceeded a per-call resource ceiling (gas, fuel, memory, depth, database operations, response size).

PlayerFaultCode.PLATFORM_BUSY

The platform could not start the work in time. The app's code never ran. Retrying is correct.

PlayerFaultCode.PLATFORM_ERROR

A platform failure. Retrying is reasonable.

PlayerFaultCode.BUDGET_EXCEEDED

A per-minute allowance for this app is spent; it returns on the next window.

PlayerFaultCode.RATE_LIMITED

This caller is asking too often. It arrives ONLY as a thrown error, never in band on a result, and extensions.retryAfterMs carries the wait. That number is the milliseconds REMAINING in the current fixed window at the moment the refusal was built, not a fixed backoff, so a second refusal inside the same window carries a smaller number: treat it as a deadline from receipt and do not reuse a cached one.

PlayerFaultCode.QUOTA_EXHAUSTED

A metered allowance is spent and does not return on its own.

PlayerFaultCode.WALLET_EMPTY

PlayerFaultCode.SPEND_CAP_REACHED

PlayerFaultCode.TEMPORARILY_DISABLED

A breaker is open or an operator switch is off for this subject.

PlayerFaultCode.INVALID_REQUEST

The arguments did not satisfy the function's contract.

PlayerFaultCode.NOT_ALLOWED

An invoke policy or permission refused this caller.

PlayerFaultCode.NOT_FOUND

The named function, module or export does not exist for this app.

PlayerFaultCode.UNAUTHENTICATED

No valid credential was presented.

PlayerFaultCode.WRONG_DATACENTER

This app is served from another datacenter. The error extensions carry gameApiUrl; move there and retry.

PlayerFaultCode.APP_UNAVAILABLE

The app's datacenter has no instance able to serve clients. No endpoint is named, on purpose — there is nowhere to send the client.

Member Of

PlayerFaultInfo object