invoke-ai/InvokeAI · info · HTTPException
Video metadata not found
Error message
Video metadata not found
What it means
Raised by get_video_metadata (GET videos/i/{video_name}/metadata) as HTTP 404 when videos.get_metadata(video_name) raises any exception. It usually means the video record is missing, but because the handler catches Exception broadly, any service error (DB failure, corrupt metadata) is also reported as 404. The response carries no detail body.
Source
Thrown at invokeai/app/api/routers/videos.py:512
return ApiDependencies.invoker.services.videos.get_dto(video_name)
except VideoRecordNotFoundException:
# See get_image_dto: this is the 404 a workflow's video field drops its reference on,
# so only a genuinely missing record may produce it.
raise HTTPException(status_code=404)
@videos_router.get(
"/i/{video_name}/metadata", operation_id="get_video_metadata", response_model=Optional[MetadataField]
)
def get_video_metadata(
current_user: CurrentUserOrDefault,
video_name: str = PathParam(description="The name of video to get"),
) -> Optional[MetadataField]:
_assert_video_read_access(video_name, current_user)
try:
return ApiDependencies.invoker.services.videos.get_metadata(video_name)
except Exception:
raise HTTPException(status_code=404)
@videos_router.get(
"/i/{video_name}/workflow", operation_id="get_video_workflow", response_model=WorkflowAndGraphResponse
)
def get_video_workflow(
current_user: CurrentUserOrDefault,
video_name: str = PathParam(description="The name of video whose workflow to get"),
) -> WorkflowAndGraphResponse:
"""Gets the workflow and graph saved with a generated video (mirrors the image route)."""
_assert_video_read_access(video_name, current_user)
try:
workflow = ApiDependencies.invoker.services.videos.get_workflow(video_name)
graph = ApiDependencies.invoker.services.videos.get_graph(video_name)
return WorkflowAndGraphResponse(workflow=workflow, graph=graph)
except Exception:
raise HTTPException(status_code=404)
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Confirm the video exists via GET videos/i/{video_name} first — if that also 404s, the video is gone, not just the metadata.
- Check server logs to distinguish a missing record from a corrupt/unreadable metadata blob.
- Re-generate or re-upload the video if its metadata was never written.
- If the record exists but metadata 404s, treat it as a service bug and report with server logs.
Example fix
// before const meta = await api.getVideoMetadata(name); // ambiguous 404 // after const exists = await api.getVideoDto(name).then(() => true, () => false); const meta = exists ? await api.getVideoMetadata(name) : null;
Defensive patterns
Strategy: fallback
Validate before calling
const exists = await api.getVideoDto(name).then(() => true, () => false); if (!exists) return null; // video gone; metadata certainly unavailable
Try / catch
try {
return await api.getVideoMetadata(name);
} catch (e) {
if (e.response?.status === 404) return null; // no metadata available
throw e;
} Prevention
- Render metadata panels with a null/empty fallback for videos lacking metadata.
- Check the video itself exists before attributing a metadata 404 to corruption.
- Keep server logs handy — broad Exception catch means 404 may mask DB errors.
When it happens
Trigger: Requesting metadata for a deleted/nonexistent video_name; a metadata parse failure on a corrupt record; any database error during the metadata read.
Common situations: Videos imported or created by older InvokeAI versions lacking the expected metadata; DB/restore mismatches; probing metadata after a failed upload that never recorded the video.
Related errors
- Video record not found
- Video workflow not found
- Video URLs not found
- Board not found
- System prompt not found
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/ed3980b201d60a6b.
Report an issue: GitHub.