paperclipai/paperclip · error · HttpError
oauth_metadata_failed
oauth_metadata_failed
Error message
OAuth provider metadata could not be loaded
What it means
Discovery guard in the OAuth endpoint resolution chain: none of the well-known metadata URLs (oauth-authorization-server / openid-configuration) returned usable endpoints. Without metadata the provider flow cannot proceed; the remote provider's discovery documents are at fault.
Source
Thrown at server/src/services/tool-access.ts:4204
toolName: entry.toolName ?? null,
riskLevel: entry.riskLevel ?? null,
conditions: entry.conditions ?? null,
})));
}
async function replaceProfileEntries(companyId: string, profileId: string, entries: CreateToolProfileEntryForProfile[]) {
for (const entry of entries) {
await assertProfileEntryInput(companyId, entry);
}
await db
.delete(toolProfileEntries)
.where(and(eq(toolProfileEntries.companyId, companyId), eq(toolProfileEntries.profileId, profileId)));
await createProfileEntries(companyId, profileId, entries);
}
/**
* @param grantSecretRefs Secret refs held by a grant rather than the connection
* row. A personal credential lives only on its user grant (PAP-17835), so it
* would otherwise have no `company_secret_bindings` row and drop out of
* secret projection and removal teardown.
*/
async function syncCredentialBindings(
connection: typeof toolConnections.$inferSelect,
grantSecretRefs: ToolCredentialSecretRef[] = [],
dbClient: ToolAccessMutationDb = db,
) {
await dbClient
.delete(companySecretBindings)
.where(
and(
eq(companySecretBindings.companyId, connection.companyId),
eq(companySecretBindings.targetType, "tool_connection"),
eq(companySecretBindings.targetId, connection.id),
),
);
// A metadata edit or pause/resume must retain declarations for everyView on GitHub (pinned to 01ad858492)
Solutions
- The OAuth provider metadata document could not be fetched. Verify the issuer URL, network egress, and that the provider supports discovery.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at server/src/services/tool-access.ts:4054 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/fa320bcb6af550b2.
Report an issue: GitHub.