diegosouzapw/OmniRoute · error

INTERNAL_003

INTERNAL_003

Error message

Circuit breaker open

What it means

INTERNAL_003 (503): the provider circuit breaker for the target is OPEN — repeated upstream failures temporarily blocked the provider. Requests are refused fast until the reset timeout elapses and a half-open probe succeeds.

Solutions

  1. Wait for the breaker reset window (30–60s by profile) then retry
  2. Route to a different provider via combo fallback
  3. Investigate the underlying provider failures that tripped the breaker
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/shared/constants/errorCodes.ts:211 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/9573d04037ac4fd3. Report an issue: GitHub.

Appendix: source

Thrown at src/shared/constants/errorCodes.ts:211

    httpStatus: 400,
    category: "COMBO",
  },

  // ── Internal ──
  INTERNAL_001: {
    code: "INTERNAL_001",
    message: "Internal server error",
    httpStatus: 500,
    category: "INTERNAL",
  },
  INTERNAL_002: {
    code: "INTERNAL_002",
    message: "Database error",
    httpStatus: 500,
    category: "INTERNAL",
  },
  INTERNAL_003: {
    code: "INTERNAL_003",
    message: "Circuit breaker open",
    httpStatus: 503,
    category: "INTERNAL",
  },
};

export function createErrorResponse(code: string, details: ErrorDetails = {}) {
  const def = ERROR_CODES[code];
  if (!def) {
    return {
      error: {
        code: "INTERNAL_001",
        message: `Unknown error code: ${code}`,
        category: "INTERNAL",
      },
      status: 500,
    };
  }

View on GitHub (pinned to a179ffed5b)