Skip to main content

DataStoreNonRetryableLoadError

This item only works when running on the server. Server

Wraps a datastore-operation failure during a session-locked load so it is distinguishable from lock contention. Op failures (e.g. 509) will not resolve by retrying -- Roblox already retries internally -- so we fail fast rather than grinding the acquire backoff, while lock contention (a successful op that returns a locked profile) keeps retrying. The original error is preserved.

Functions

new

DataStoreNonRetryableLoadError.new(innerErrorany) → DataStoreNonRetryableLoadError

Wraps an inner error so it is treated as non-retryable during a session-locked load.

isNonRetryableLoadError

DataStoreNonRetryableLoadError.isNonRetryableLoadError(errany) → boolean

Returns true if the given error is a DataStoreNonRetryableLoadError.

unwrapLoadError

DataStoreNonRetryableLoadError.unwrapLoadError(errany) → any

Returns the original inner error if the given error is a DataStoreNonRetryableLoadError, otherwise returns the error unchanged.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Wraps an inner error so it is treated as non-retryable during a session-locked load.",
            "params": [
                {
                    "name": "innerError",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "DataStoreNonRetryableLoadError"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 33,
                "path": "src/datastore/src/Server/DataStoreNonRetryableLoadError.lua"
            }
        },
        {
            "name": "isNonRetryableLoadError",
            "desc": "Returns true if the given error is a [DataStoreNonRetryableLoadError].",
            "params": [
                {
                    "name": "err",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 43,
                "path": "src/datastore/src/Server/DataStoreNonRetryableLoadError.lua"
            }
        },
        {
            "name": "unwrapLoadError",
            "desc": "Returns the original inner error if the given error is a [DataStoreNonRetryableLoadError],\notherwise returns the error unchanged.",
            "params": [
                {
                    "name": "err",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 54,
                "path": "src/datastore/src/Server/DataStoreNonRetryableLoadError.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "DataStoreNonRetryableLoadError",
    "desc": "Wraps a datastore-operation failure during a session-locked load so it is distinguishable from\nlock contention. Op failures (e.g. 509) will not resolve by retrying -- Roblox already retries\ninternally -- so we fail fast rather than grinding the acquire backoff, while lock contention (a\nsuccessful op that returns a locked profile) keeps retrying. The original error is preserved.",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 11,
        "path": "src/datastore/src/Server/DataStoreNonRetryableLoadError.lua"
    }
}