{"record":{"id":"da0cdbfcf1156821","repo":"invoke-ai/InvokeAI","slug":"error-retrieving-recall-parameters","errorCode":null,"errorMessage":"Error retrieving recall parameters","messagePattern":"Error retrieving recall parameters","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"invokeai/app/api/routers/recall_parameters.py","lineNumber":617,"sourceCode":"\n    Returns:\n        A dictionary containing all stored recall parameters\n    \"\"\"\n    logger = ApiDependencies.invoker.services.logger\n\n    try:\n        # Retrieve all recall parameters by iterating through expected keys\n        # Since client_state_persistence doesn't have a \"get_all\" method, we'll\n        # return an informative response\n        return {\n            \"status\": \"success\",\n            \"queue_id\": queue_id,\n            \"note\": \"Use the frontend to access stored recall parameters, or set specific parameters using POST\",\n        }\n\n    except Exception as e:\n        logger.error(f\"Error retrieving recall parameters: {e}\")\n        raise HTTPException(\n            status_code=500,\n            detail=\"Error retrieving recall parameters\",\n        )\n","sourceCodeStart":599,"sourceCodeEnd":621,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/api/routers/recall_parameters.py#L599-L621","documentation":"A catch-all handler in the recall_parameters router: any exception raised while loading stored graph-recall parameters is logged and re-raised as an HTTPException with a fixed 500 detail string. The library throws it because the endpoint cannot distinguish (or did not bother to distinguish) storage/query failures from other faults, so all failures collapse into one generic 500 response. The original exception message is only visible in server logs, not in the API response.","triggerScenarios":"Calling GET on the recall parameters endpoint when the backing service (ApiDependencies.invoker.services) throws - e.g. the parameters store/graph service is unavailable, a malformed stored record fails to deserialize, or a database/session error occurs during retrieval.","commonSituations":"Running InvokeAI with a corrupted or migrated-from-an-older-version SQLite database so stored parameter records fail to load; invoking the endpoint before the app's services are fully initialized; a bug in the underlying service surfaced as a generic 500.","solutions":["Check the server logs for the line 'Error retrieving recall parameters: {e}' to see the real underlying exception","Verify the InvokeAI database (invokeai.db) is intact and current with the running version; run the app's migration/upgrade path if needed","Confirm services are initialized - retry after a full clean app restart","Reproduce the retrieval directly against the DB/service to isolate the failing record and delete or repair it"],"exampleFix":"// before: server log shows the real cause only\nlogger.error(f\"Error retrieving recall parameters: {e}\")\nraise HTTPException(status_code=500, detail=\"Error retrieving recall parameters\")\n// after: surface a safer, more actionable detail\nlogger.exception(\"Error retrieving recall parameters\")\nraise HTTPException(status_code=500, detail=f\"Error retrieving recall parameters: {type(e).__name__}\")","handlingStrategy":"try-catch","validationCode":"// client-side precheck: ensure the service is reachable before calling\nconst health = await fetch('/api/v1/system/health');\nif (!health.ok) throw new Error('InvokeAI service unavailable; skip recall-parameters call');","typeGuard":"function isRecallParamsOk(v) { return v !== null && typeof v === 'object' && !('detail' in v); }","tryCatchPattern":"try {\n  const res = await fetch('/api/v1/recall_parameters');\n  if (res.status === 500) { const {detail} = await res.json(); console.error('recall params unavailable:', detail); return fallbackParams; }\n  return await res.json();\n} catch (e) { return fallbackParams; }","preventionTips":["Always read server logs; the HTTP detail omits the real cause","Keep the InvokeAI database migrated to match the running version","Health-check the service before invoking admin/aux endpoints","Treat this endpoint as best-effort and degrade gracefully"],"tags":["fastapi","http-500","api","database"],"backgroundTag":"api-internal-server-error","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}