diegosouzapw/OmniRoute · error · Error

errBody?.error?.message || `POST /api/quota/pools failed: HT

Error message

errBody?.error?.message || `POST /api/quota/pools failed: HTTP ${createRes.status}`

What it means

Error "errBody?.error?.message || `POST /api/quota/pools failed: HTTP ${createRes.status}`" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/app/(dashboard)/dashboard/costs/quota-share/components/PoolWizard.tsx:457

    try {
      if (!editPool) {
        // ── Create mode: POST → optional PUT → PATCH ──────────────────────

        // 1. POST /api/quota/pools → get new pool id
        const createRes = await fetch("/api/quota/pools", {
          method: "POST",
          headers: { "Content-Type": "application/json" },
          body: JSON.stringify({
            connectionId: primaryConnectionId,
            connectionIds,
            name: effectivePoolName,
            allocations: [],
            groupId: resolvedGroupId,
          }),
        });
        if (!createRes.ok) {
          const errBody = await createRes.json().catch(() => null);
          throw new Error(
            errBody?.error?.message || `POST /api/quota/pools failed: HTTP ${createRes.status}`
          );
        }
        const createData = (await createRes.json()) as { pool: { id: string } };
        const newPoolId = createData.pool.id;

        // 2. PUT /api/quota/plans/[primaryConnectionId] — only when user edited dimensions
        if (dimensionsEdited && editDimensions.length > 0) {
          const planRes = await fetch(`/api/quota/plans/${primaryConnectionId}`, {
            method: "PUT",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({ dimensions: editDimensions }),
          });
          if (!planRes.ok) {
            const errBody = await planRes.json().catch(() => null);
            throw new Error(
              errBody?.error?.message || `PUT /api/quota/plans failed: HTTP ${planRes.status}`
            );

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/app/(dashboard)/dashboard/costs/quota-share/components/PoolWizard.tsx:457 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/fc0e0b327a260a39. Report an issue: GitHub.