invoke-ai/InvokeAI · error · HTTPException

Error updating recall parameters

Error message

Error updating recall parameters

What it means

Catch-all HTTP 500 at the end of update_recall_parameters for any unexpected exception not already handled (not an HTTPException raised earlier). It logs 'Error updating recall parameters' with the underlying error and returns a generic 500 detail, hiding internals from the client.

Source

Thrown at invokeai/app/api/routers/recall_parameters.py:577

                queue_id, current_user.user_id, provided_params
            )
            logger.info("Successfully emitted recall_parameters_updated event")
        except Exception as e:
            logger.error(f"Error emitting recall parameters event: {e}", exc_info=True)
            # Don't fail the request if event emission fails, just log it

        return {
            "status": "success",
            "queue_id": queue_id,
            "updated_count": updated_count,
            "parameters": provided_params,
        }

    except HTTPException:
        raise
    except Exception as e:
        logger.error(f"Error updating recall parameters: {e}")
        raise HTTPException(
            status_code=500,
            detail="Error updating recall parameters",
        )


@recall_parameters_router.get(
    "/{queue_id}",
    operation_id="get_recall_parameters",
    response_model=dict[str, Any],
)
def get_recall_parameters(
    current_user: CurrentUserOrDefault,
    queue_id: str = Path(..., description="The queue id to retrieve parameters for"),
) -> dict[str, Any]:
    """
    Retrieve all stored recall parameters for a given queue.

    Returns a dictionary of all recall parameters that have been set for the queue.

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Check the server log for 'Error updating recall parameters: {e}' — the real cause is only there, not in the response
  2. Retry the request after confirming services are healthy
  3. Validate the request payload (queue_id exists, parameter keys are known) before calling
  4. If reproducible, reproduce with verbose logging or run with debug enabled and file an issue
  5. Ensure the InvokeAI services (queue, client_state_persistence) are correctly initialized after upgrades
Defensive patterns

Strategy: try-catch

Validate before calling

// validate inputs before calling to avoid the catch-all 500
const queues = await api.getQueueItemNames();
if (!queues.includes(queueId)) throw new Error(`unknown queue ${queueId}`);
for (const k of Object.keys(params)) if (!isKnownRecallParam(k)) throw new Error(`unknown param ${k}`);

Try / catch

try {
  await api.recallParameters(queueId, params);
} catch (e) {
  if (e.status === 500 && e.body?.detail === 'Error updating recall parameters') {
    // generic 500 — consult server logs for the real exception before retrying
    console.error('recall update failed; see server log for cause');
  } else throw e;
}

Prevention

When it happens

Trigger: Any unhandled failure in the endpoint body outside per-parameter set_by_key handling: failures validating image access on non-HTTP paths, queue lookup errors, iteration bugs, or unexpected service exceptions.

Common situations: Unanticipated service-layer exceptions (queue not found but surfacing as generic Exception), bugs introduced by version upgrades, misconfigured ApiDependencies services.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/c17dd5de88c1b01a. Report an issue: GitHub.