fix: handle 404 for scenes endpoint gracefully
- Scenes endpoint may not be implemented in Core API yet - useVLMScenes returns empty array instead of error on 404
This commit is contained in:
@@ -61,6 +61,11 @@ export function useVLMScenes(fileUuid: string) {
|
||||
try {
|
||||
const base = getApiBase()
|
||||
const resp = await fetch(`${base}/api/v1/file/${fileUuid}/scenes`)
|
||||
if (resp.status === 404) {
|
||||
// Scenes endpoint may not be implemented yet
|
||||
scenes.value = []
|
||||
return
|
||||
}
|
||||
if (!resp.ok) throw new Error(`HTTP ${resp.status}`)
|
||||
const data = await resp.json()
|
||||
scenes.value = Array.isArray(data) ? data : (data.scenes || [])
|
||||
|
||||
Reference in New Issue
Block a user