This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.

The procedure is defined as:

proc nsmcp::accessAggregationDiagnostic {phase message options handle} {
    
    set native {}; set code [lrange [dict get $options -errorcode] 0 1]
    if {$handle ne {} && $phase in {detach-spool attach-spool configure-spool disk-budget create-schema verify-owner write-batch read-results record-store}
        && ![catch {ns_db exception $handle} exception]} {
        if {[lindex $exception 0] ne {}} {set code [lindex $exception 0]}
        set native [lindex $exception 1]
    }
    if {![regexp {^[A-Za-z0-9_ -]{1,64}$} $code]} {set code UNSPECIFIED}
    set text [string tolower "$message $native"]
    set kind operation-failed
    foreach {pattern label} {
        {*record-store-pool-wait-limit*} pool-timeout
        {*record-store-disk-limit*} disk-limit
        {*record-store-generation-changed*} source-changed
        {*record-store-range-limit*} range-limit
        {*aggregation-pool-wait-limit*} pool-timeout
        {*aggregation-spool-missing*} spool-missing
        {*aggregation-owner-mismatch*} owner-mismatch
        {*aggregation-wrong-driver*} wrong-driver
        {*aggregation-disk-limit*} disk-limit
        {*database*locked*} database-locked
        {*database*busy*} database-busy
        {*database or disk is full*} disk-full
        {*unable to open database*} database-open-failed
        {*not a database*} invalid-database
        {*database*malformed*} corrupt-database
        {*readonly*} read-only
        {*permission denied*} permission-denied
        {*no such table*} missing-schema
        {*already in use*} attachment-conflict
        {*no access to pool*} pool-access-denied
        {*could not allocate*handle*} pool-allocation-failed
        {*no such file*} file-missing
    } {if {[string match $pattern $text]} {set kind $label; break}}
    set id [ns_crypto::randombytes -encoding hex 12]
    ns_log error "nsmcp: access aggregation failed: phase=$phase class=$kind code=$code diagnostic=$id"
    return [dict create phase $phase class $kind code $code diagnosticId $id]

}

Show another procedure: