fix(13-11): log per-scope permission denials instead of returning silently
On-device, an empty films search looked like a broken fetch. The console said only "library: not permitted" — the content scopes returned null without a word, so an ungranted Media/File permission was indistinguishable from "this node genuinely has no films". That ambiguity cost real diagnosis time and sent me looking for a code fault that was not there. Each scope now names itself when denied. The permission was the whole cause; no content path was broken. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
11b9cb5012
commit
7c23505d8c
@@ -276,7 +276,19 @@ export function useArchy() {
|
||||
scopes.map((s) =>
|
||||
archyBridge
|
||||
.requestArchyContent('all', s)
|
||||
.then((res) => (res.permitted ? res : null))
|
||||
.then((res) => {
|
||||
// Log the denial per scope. A silent null here is indistinguishable
|
||||
// from "the node genuinely has no content", which is exactly the
|
||||
// ambiguity that made an ungranted Media/File permission look like
|
||||
// a broken films search on-device.
|
||||
if (!res.permitted) {
|
||||
console.warn(
|
||||
`[AIUI Archy] content(${s}): not permitted — enable Media/File access in Archy Settings`,
|
||||
)
|
||||
return null
|
||||
}
|
||||
return res
|
||||
})
|
||||
.catch((err) => {
|
||||
console.warn(`[AIUI Archy] content(${s}) failed:`, (err as Error)?.message ?? err)
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user