AXIOS v1.7.0Developer documentation · source-generated catalog
Errors & Versioning

Handle failure as part of the integration contract.

AXIOS exports return transport and validation failures to the callback rather than requiring downstream resources to guess whether a mutation was accepted.

Callback behavior

server.lua
function(ok, data, statusCode, headers)
    if not ok then
        local code = data and data.error or 'request_failed'
        print(('AXIOS error %s (HTTP %s)'):format(
            tostring(code), tostring(statusCode)
        ))
        return
    end

    -- Safe to consume data here.
end

What status classes mean

2xx

The request was accepted. Continue to validate the returned object before assuming optional fields exist.

4xx

The request was rejected by validation, authorization, state-transition rules, tenant scope, entitlement or record existence checks.

5xx

The request did not complete normally. Log the status and correlation context and avoid inventing a successful local state.

Network failure

Treat an unavailable API as a failed integration action. Retry only where your workflow is safe and use idempotency for mutations.

Version compatibility

Use GetBridgeState() and GetBridgeVersion() where your resource needs to gate behavior on an installed bridge version. Prefer capability checks and named exports over assumptions about an undocumented internal route.

Do not turn a rejected mutation into local success.If AXIOS rejects a legal, records, dispatch or identity state change, downstream gameplay should not pretend the authoritative CAD state changed.