Mintplex-Labs/anything-llm · error · Error
Invalid source property provided
Error message
Invalid source property provided
What it means
After the required-namespace check passes, the pinecone 'namespace-stats' handler verifies the namespace exists in the index (describeIndexStats shows no such namespace) before fetching stats. The throw means the name parsed fine as a request but Pinecone has no vectors under it — the workspace was never embedded, or its embeddings were cleared.
Solutions
- Embed at least one document into the workspace (upload via UI or data connector) so the namespace is created in Pinecone, then retry stats.
- List what actually exists: GET /api/ext/vectors/namespaces, or check the Pinecone console's namespace list for the index.
- If you recently recreated or switched indexes (PINECONE_INDEX), re-embed the workspaces — namespaces do not carry over.
- Verify the slug character-for-character, including dashes from spaces and lowercase conversion.
Example fix
# before - stats for a never-embedded workspace
curl -X POST .../api/ext/vectors/namespace-stats -d '{"namespace": "empty-ws"}'
# -> Namespace by that name does not exist.
# after - list real namespaces, then query one
# 1) embed a document into the workspace via UI/collector
# 2) curl -H "Authorization: Bearer $KEY" .../api/ext/vectors/namespaces
# 3) curl -X POST .../namespace-stats -d '{"namespace": "populated-ws"}' Defensive patterns
Strategy: validation
Validate before calling
const namespaces = await client.get('/api/ext/vectors/namespaces'); // slugs that actually exist
const slugs = namespaces.map((n) => n.name);
if (!slugs.includes(targetNamespace)) {
return { error: `Namespace '${targetNamespace}' has no embeddings — embed the workspace first` };
}
const stats = await client.post('/api/ext/vectors/namespace-stats', { namespace: targetNamespace }); Type guard
async function namespaceIsPopulated(vectorDB, namespace) {
if (!namespace) return false;
try {
return await vectorDB.hasNamespace(namespace);
} catch {
return false;
}
} Try / catch
try {
const stats = await vectorDB['namespace-stats']({ namespace });
} catch (e) {
if (/does not exist/i.test(e.message)) {
// nothing to report on — surface 'workspace not embedded yet' to the caller
return { message: `Workspace '${namespace}' has no embedded documents yet.` };
}
throw e;
} Prevention
- Check hasNamespace (or list namespaces) before stats/delete calls.
- Embed documents immediately after workspace creation so namespaces exist early.
- After recreating a vector index or resetting embeddings, re-embed all workspaces before querying stats.
- Compare slugs exactly — copy them from the namespace list rather than retyping.
When it happens
Trigger: Requesting stats for a workspace where no documents have been embedded yet; after embeddings were reset or the Pinecone index was wiped/recreated; querying a slug that exists as a workspace but was never populated; embed jobs that all failed earlier (e.g., empty-document errors) so nothing was ever upserted.
Common situations: Fresh install where the user checks stats before uploading/embedding anything; pointing PINECONE_INDEX at a new empty index after recreating it; failed ingestion runs that silently left the namespace empty; slug typo that matches no populated namespace.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
AI-assisted analysis of Mintplex-Labs/anything-llm@f92433b4ea (2026-08-18).
Data as JSON: /api/errors/118c25afe05e8dbd.
Report an issue: GitHub.
Appendix: source
Thrown at collector/extensions/resync/index.js:72
throw new Error(`Failed to sync YouTube video transcript. ${reason}`);
response.status(200).json({ success, content });
} catch (e) {
console.error(e);
response.status(200).json({
success: false,
content: null,
});
}
}
/**
* Fetches the content of a specific confluence page via its chunkSource.
* Returns the content as a text string of the page in question and only that page.
* @param {object} data - metadata from document (eg: chunkSource)
* @param {import("../../middleware/setDataSigner").ResponseWithSigner} response
*/
async function resyncConfluence({ chunkSource }, response) {
if (!chunkSource) throw new Error("Invalid source property provided");
try {
// Confluence data is `payload` encrypted. So we need to expand its
// encrypted payload back into query params so we can reFetch the page with same access token/params.
const source = response.locals.encryptionWorker.expandPayload(chunkSource);
const {
fetchConfluencePage,
} = require("../../utils/extensions/Confluence");
const baseUrl = source.searchParams.get("baseUrl");
const { success, reason, content } = await fetchConfluencePage({
// The stored pathname carries no scheme. Use the one from baseUrl so the
// page url matches the one the loader builds from the same baseUrl.
pageUrl: `${protocolOf(baseUrl)}${source.pathname}`,
baseUrl,
spaceKey: source.searchParams.get("spaceKey"),
accessToken: source.searchParams.get("token"),
username: source.searchParams.get("username"),
personalAccessToken: source.searchParams.get("personalAccessToken"),
cloud: source.searchParams.get("cloud") === "true",View on GitHub (pinned to f92433b4ea)