ADK for TypeScript: API Reference
    Preparing search index...

    Interface DatabaseSessionServiceOptions

    Options for configuring DatabaseSessionService.

    interface DatabaseSessionServiceOptions {
        staleSession?: "reject" | "reload";
    }

    Hierarchy

    • MikroORMOptions
      • DatabaseSessionServiceOptions
    staleSession?: "reject" | "reload"

    How to handle stale sessions in DatabaseSessionService.appendEvent.

    • 'reject' (default): throws a StaleSessionError without persisting changes.
    • 'reload': reloads stored events and state into the session object after writing.

    'reload' is deprecated and will be removed in a future release. Use 'reject' (the default) and re-read the session with getSession to retry.