Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/core/src/lib/core/access-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,12 @@ export async function checkUniqueItemExists(
try {
const item = await context.db[foreignList.listKey].findOne({ where: uniqueInput })
if (item !== null) return uniqueWhere
} catch (err) {}
} catch (err) {
// Log access control errors for debugging — access will still be denied below
if (process.env.NODE_ENV !== 'production') {
console.warn(`[keystone] access-control: findOne failed for ${foreignList.listKey}:`, err)
}
}

throw accessDeniedError(cannotForItem(operation, foreignList))
}