diegosouzapw/OmniRoute · error · SettingsRevisionConflictError
SETTINGS_REVISION_CONFLICT
SETTINGS_REVISION_CONFLICT
Error message
Settings changed since this snapshot; refresh and retry
What it means
Error "Settings changed since this snapshot; refresh and retry" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/app/api/settings/route.ts:447
if (body.newPassword) {
body.password = await hashManagementPassword(body.newPassword);
delete body.newPassword;
}
delete body.currentPassword;
delete body.expectedRevision;
// Snapshot BEFORE the write so the success row can record a real diff.
const beforeSnapshot = (await getSettings()) as Record<string, unknown>;
let settings: Awaited<ReturnType<typeof getSettings>>;
try {
settings = await updateSettings(body, { expectedRevision });
} catch (error) {
if (error instanceof SettingsRevisionConflictError) {
emitSettingsFailureAudit(request, actor, "SETTINGS_REVISION_CONFLICT", attemptedKeys);
return NextResponse.json(
{
error: {
code: "SETTINGS_REVISION_CONFLICT",
message: "Settings changed since this snapshot; refresh and retry",
currentRevision: error.currentRevision,
},
},
{ status: 409, headers: settingsResponseHeaders(error.currentRevision) }
);
}
throw error;
}
// Sync CLIProxyAPI settings to upstream_proxy_config table
const cpaUrl = rawBody.cliproxyapi_url as string | undefined;
const cpaFallback = rawBody.cliproxyapi_fallback_enabled as boolean | undefined;
if (cpaUrl && typeof cpaUrl === "string") {
const urlValidation = validateProxyUrl(cpaUrl);
if (urlValidation.valid === false) {
emitSettingsFailureAudit(request, actor, "CLIPROXY_URL_INVALID", attemptedKeys);
return NextResponse.json(View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/app/api/settings/route.ts:447 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/6a609371a1353743.
Report an issue: GitHub.