diegosouzapw/OmniRoute · error · Error

errBody?.error?.message || `PUT /api/quota/plans failed: HTT

Error message

errBody?.error?.message || `PUT /api/quota/plans failed: HTTP ${planRes.status}`

What it means

Error "errBody?.error?.message || `PUT /api/quota/plans failed: HTTP ${planRes.status}`" thrown in diegosouzapw/OmniRoute.

Source

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

        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}`
            );
          }
        }

        // 3. PATCH /api/quota/pools/[id] — allocations + exclusive flag
        const patchRes = await fetch(`/api/quota/pools/${newPoolId}`, {
          method: "PATCH",
          headers: { "Content-Type": "application/json" },
          body: JSON.stringify({ allocations, exclusive }),
        });
        if (!patchRes.ok) {
          const errBody = await patchRes.json().catch(() => null);
          throw new Error(
            errBody?.error?.message || `PATCH /api/quota/pools failed: HTTP ${patchRes.status}`
          );
        }
      } else {

View on GitHub (pinned to a179ffed5b)

When it happens

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