Sanity Library Reference Docs
    Preparing search index...

    An engine-owned document an observer stream could not validate — the session's explicit invalid state, surfaced instead of feeding a document the engine would misread. Two reasons, mirroring the engine's two read gates:

    • model-ahead — the doc's reader floor is above this engine's data model (ModelVersionAheadError); the remediation is upgrading @sanity/workflow-engine.
    • shape-violation — the doc failed its shape parse (PersistedDocShapeError); the stored tree is corrupt.
    interface InvalidDoc {
        _invalid: true;
        documentId: string;
        message: string;
        reason: "model-ahead" | "shape-violation";
    }
    Index

    Properties

    _invalid: true
    documentId: string
    message: string

    Human-readable failure naming the doc and the offending fields.

    reason: "model-ahead" | "shape-violation"