juspay/hyperswitch · error · Error

Unsupported connector: ${connectorId}

Error message

Unsupported connector: ${connectorId}

What it means

Thrown by the default branch of the connector switch in HandlerForConnectorsWithRedirection (cypress-tests-v2/cypress/support/redirectionHandler.js:279). The helper walks a large switch over connectorId to decide how to verify each connector's redirect/return URL; any connector without a matching case (or a misspelled id) hits the default and aborts the spec.

Source

Thrown at cypress-tests-v2/cypress/support/redirectionHandler.js:279

          );
          cy.get(".BankSearch_searchIcon__EcVO7").click();
          cy.get(".BankSearch_bankWrapper__R5fUK").click();
          cy.get("._transactionId__primaryButton__nCa0r").click();
          cy.get(".normal-3").should("contain.text", "Kontoauswahl");
          break;
        case "sofort":
          break;
        case "trustly":
          break;
        default:
          throw new Error(
            `Unsupported payment method type: ${payment_method_type}`
          );
      }
      verifyUrl = false;
      break;
    default:
      throw new Error(`Unsupported connector: ${connectorId}`);
  }

  cy.then(() => {
    verifyReturnUrl(redirection_url, expected_url, verifyUrl);
  });
}

function threeDsRedirection(redirection_url, expected_url, connectorId) {
  cy.visit(redirection_url.href);
  if (connectorId === "adyen") {
    cy.get("iframe")
      .its("0.contentDocument.body")
      .within((body) => {
        cy.get('input[type="password"]').click();
        cy.get('input[type="password"]').type("password");
        cy.get("#buttonSubmit").click();
      });
  } else if (

View on GitHub (pinned to 9b8b89dc37)

Solutions

  1. Print/inspect the exact connectorId reaching the switch (trim, casing) and compare it against the case labels above line 279
  2. Add a case for the missing connector implementing its redirect verification, then break out of the switch
  3. If the connector genuinely has no redirect verification flow yet, filter it out of the test run (skip via the spec's connector list) instead of letting the switch throw
  4. Keep the case list in sync whenever a connector is added or renamed in test configuration

Example fix

// before
default:
  throw new Error(`Unsupported connector: ${connectorId}`);

// after (add the new connector, keep the throw as a guard)
case 'zeno':
  // zeno redirects straight back to the return URL
  verifyUrl = true;
  break;
default:
  throw new Error(`Unsupported connector: ${connectorId}`);
Defensive patterns

Strategy: validation

Validate before calling

// Before delegating to the redirection handler
const REDIRECT_SUPPORT = new Set([
  'adyen', 'stripe', 'paypal', 'trustly', 'sofort', /* keep in sync with the switch */
]);
const normalized = String(connectorId).trim().toLowerCase();
if (!REDIRECT_SUPPORT.has(normalized)) {
  cy.log(`No redirect verification implemented for connector: ${connectorId} - skipping`);
  return;
}
HandlerForConnectorsWithRedirection(redirection_url, expected_url, normalized);

Try / catch

// Only if you must tolerate a throw mid-command
cy.on('fail', (err) => {
  if (err.message.includes('Unsupported connector:')) {
    /* mark test as skipped/pending for this connector */
  }
});

Prevention

When it happens

Trigger: A redirection e2e test runs with a connectorId that has no case in this switch — e.g. a newly integrated connector, a renamed id, an id with different casing/whitespace ('adyen ' / 'Stripe'), or a test matrix entry pointing at a connector this helper was never extended for.

Common situations: Adding a new connector to the test matrix without updating redirectionHandler; connector naming drift between the app config ('stripe_test') and the switch cases ('stripe'); copy-pasting a spec and forgetting to add the connector case; running the suite against an env with extra connectors enabled.

Related errors


AI-assisted analysis of juspay/hyperswitch@9b8b89dc37 (2026-08-16). Data as JSON: /api/errors/8d4352fc919d6082. Report an issue: GitHub.