diegosouzapw/OmniRoute · error

PASSWORD_MISMATCH

PASSWORD_MISMATCH

Error message

Invalid current password

What it means

Error "Invalid current password" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/api/settings/route.ts:391

          emitSettingsFailureAudit(request, actor, "PASSWORD_REQUIRED", attemptedKeys);
          return NextResponse.json(
            {
              error: {
                code: "PASSWORD_REQUIRED",
                message: "currentPassword required for security-impacting setting changes",
                keys: touchedSecurityKeys,
              },
            },
            { status: 400 }
          );
        }
        const isValid = await verifyManagementPassword(body.currentPassword, storedPasswordHash);
        if (!isValid) {
          emitSettingsFailureAudit(request, actor, "PASSWORD_MISMATCH", attemptedKeys);
          return NextResponse.json(
            {
              error: {
                code: "PASSWORD_MISMATCH",
                message: "Invalid current password",
              },
            },
            { status: 401 }
          );
        }
      }
    }

    // #6540: reject a paid-only webSearchRouteModel target when hidePaidModels
    // is on. Business-rule check (needs an async DB read), so it runs after
    // Zod shape validation rather than as a Zod .refine(). Fails open on
    // "unknown" (aliases/combo names) — only a positively-identified paid
    // catalog entry is blocked.
    if (typeof body.webSearchRouteModel === "string" && body.webSearchRouteModel.trim() !== "") {
      const currentSettings = await getSettings();
      if ((currentSettings as Record<string, unknown>)?.hidePaidModels === true) {
        if (isPaidModelTarget(body.webSearchRouteModel) === "paid") {

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/api/settings/route.ts:391 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/5685a64840393f82. Report an issue: GitHub.