@sanity/routes
    Preparing search index...

    Interface DiagnosisResultExperimental

    Detailed diagnosis of why a document ID resolved (or failed to resolve) to a URL.

    Use RouteResolver.diagnose to get this result. The message field contains a human-readable explanation suitable for logging.

    const result = await resolver.diagnose('my-doc')
    if (result.status !== 'resolved') {
    console.warn(result.message)
    // "No route entry for type "article". Available routable types: blogPost, page."
    }

    The result shape may evolve.

    interface DiagnosisResult {
        availableRoutes?: string[];
        documentId: string;
        documentType?: string;
        message: string;
        status: DiagnosisStatus;
        url?: string;
    }
    Index

    Properties

    availableRoutes?: string[]

    List of routable types, present when status is 'no_route_entry'.

    documentId: string

    The document ID that was diagnosed.

    documentType?: string

    The document's type, if it was found.

    message: string

    Human-readable explanation suitable for logging or error reporting.

    Diagnosis status code.

    url?: string

    The resolved URL, only present when status is 'resolved'.