diegosouzapw/OmniRoute · error · Error

errBody?.error?.message || `PATCH /api/quota/pools failed: H

Error message

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

What it means

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

Source

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

      } else {
        // ── Edit mode: single PATCH (folds name, groupId, connectionIds, allocations, exclusive)
        // + optional PUT for plan dimensions when user edited them.

        // 1. PATCH /api/quota/pools/[id] — all editable fields in one call
        const editPatchRes = await fetch(`/api/quota/pools/${editPool.id}`, {
          method: "PATCH",
          headers: { "Content-Type": "application/json" },
          body: JSON.stringify({
            name: effectivePoolName,
            groupId: resolvedGroupId,
            connectionIds,
            allocations,
            exclusive,
          }),
        });
        if (!editPatchRes.ok) {
          const errBody = await editPatchRes.json().catch(() => null);
          throw new Error(
            errBody?.error?.message || `PATCH /api/quota/pools failed: HTTP ${editPatchRes.status}`
          );
        }

        // 2. PUT /api/quota/plans/[primaryConnectionId] — only when user actually 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:509 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/01564812a6bdf14f. Report an issue: GitHub.