{"record":{"id":"d1e754a37ba0c963","repo":"invoke-ai/InvokeAI","slug":"failed-to-get-queue-item-summaries","errorCode":null,"errorMessage":"Failed to get queue item summaries","messagePattern":"Failed to get queue item summaries","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"invokeai/app/api/routers/session_queue.py","lineNumber":259,"sourceCode":"    responses={200: {\"model\": list[SessionQueueItemSummary]}},\n)\ndef get_queue_item_summaries_by_ids(\n    current_user: CurrentUserOrDefault,\n    queue_id: str = Path(description=\"The queue id to perform this operation on\"),\n    item_ids: list[int] = Body(\n        embed=True,\n        max_length=MAX_QUEUE_ITEM_IDS_PER_REQUEST,\n        description=\"Object containing list of queue item ids to fetch summaries for\",\n    ),\n) -> list[SessionQueueItemSummary]:\n    \"\"\"Gets lightweight queue item summaries for specified IDs in requested order.\"\"\"\n    try:\n        summaries = ApiDependencies.invoker.services.session_queue.get_queue_item_summaries_by_ids(\n            queue_id=queue_id, item_ids=item_ids\n        )\n        return [sanitize_queue_item_for_user(item, current_user.user_id, current_user.is_admin) for item in summaries]\n    except Exception:\n        raise HTTPException(status_code=500, detail=\"Failed to get queue item summaries\")\n\n\n@session_queue_router.put(\n    \"/{queue_id}/processor/resume\",\n    operation_id=\"resume\",\n    responses={200: {\"model\": SessionProcessorStatus}},\n)\ndef resume(\n    current_user: AdminUserOrDefault,\n    queue_id: str = Path(description=\"The queue id to perform this operation on\"),\n) -> SessionProcessorStatus:\n    \"\"\"Resumes session processor. Admin only.\"\"\"\n    try:\n        return ApiDependencies.invoker.services.session_processor.resume()\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=f\"Unexpected error while resuming queue: {e}\")\n\n","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/api/routers/session_queue.py#L241-L277","documentation":"Catch-all in get_queue_item_summaries_by_ids: any exception from fetching summaries or sanitizing them per-user becomes a 500 with the static detail 'Failed to get queue item summaries'. As with error 144 the client gets no cause information; diagnostics require server logs.","triggerScenarios":"POST /{queue_id}/item_summaries_by_ids when the queue service throws - unknown queue_id, DB failure, or sanitize_queue_item_for_user failing on a stored summary with unexpected shape.","commonSituations":"Requesting summaries for ids deleted moments earlier; mixed-version clients sending ids from a prior schema; multiuser mode where sanitizer input is malformed.","solutions":["Look at the server-side traceback for the real exception","Verify ids exist and belong to the given queue before batching the request","If multiuser is on, inspect stored summaries for schema drift and repair/upgrade the DB","Retry; treat as transient if it coincides with heavy DB activity"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const ids = await (await fetch(`/api/v1/queue/${queueId}/item_ids`)).json();\nif (requestedIds.some(id => !ids.includes(id))) console.warn('some ids may have been deleted; summary fetch may fail');","typeGuard":"function isSummaryList(v) { return Array.isArray(v) && v.every(s => s && typeof s === 'object' && 'item_id' in s && 'status' in s); }","tryCatchPattern":"try {\n  const res = await fetch(`/api/v1/queue/${queueId}/item_summaries_by_ids`, {method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify({item_ids: requestedIds})});\n  if (!res.ok) return [];\n  return await res.json();\n} catch { return []; }","preventionTips":["Verify ids exist in the target queue before requesting summaries","Prefer the summaries endpoint over full items to reduce failure surface","In multiuser mode ensure the DB schema matches the running version","Retry on transient failures during heavy queue activity"],"tags":["fastapi","http-500","queue","api"],"backgroundTag":"api-internal-server-error","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}