juspay/hyperswitch · error · Error

Connector Create Call Failed ${response.body.error.message}

Error message

Connector Create Call Failed ${response.body.error.message}

What it means

Thrown by the createNamedConnectorCallTest command (cypress-tests/cypress/support/commands.js:1599) when POST {baseUrl}/account/{merchantId}/connectors returns non-200 during named-connector creation. The status is first printed via cy.task('cli_log'), then the server's error.message is rethrown. The connector name is normalized (stripeconnect -> stripe) before the request, so the server validates the original name.

Source

Thrown at cypress-tests/cypress/support/commands.js:1599

        }).then((response) => {
          logRequestId(response.headers["x-request-id"]);

          cy.wrap(response).then(() => {
            if (response.status === 200) {
              expect(getOriginalConnectorName(connectorName)).to.equal(
                response.body.connector_name
              );
              globalState.set(
                `${mcaPrefix}Id`,
                response.body.merchant_connector_id
              );
            } else {
              cy.task(
                "cli_log",
                "response status -> " + JSON.stringify(response.status)
              );

              throw new Error(
                `Connector Create Call Failed ${response.body.error.message}`
              );
            }
          });
        });
      }
    );
  }
);

Cypress.Commands.add(
  "createConnectorCallTest",
  (
    connectorType,
    createConnectorBody,
    payment_methods_enabled,
    globalState,
    profilePrefix = "profile",

View on GitHub (pinned to 9b8b89dc37)

Solutions

  1. Read the cli_log line just above the error (it prints the HTTP status) plus the embedded server message
  2. Verify the connector's creds in creds.json are valid for the target environment — re-issue sandbox keys if expired
  3. Check for a duplicate connector on the profile and delete or reuse it
  4. Confirm the profile under `${profilePrefix}Id` exists and belongs to the same merchant
  5. Correlate via the logged x-request-id in server logs
Defensive patterns

Strategy: try-catch

Validate before calling

cy.readFile(globalState.get('connectorAuthFilePath')).then((json) => {
  const { authDetails } = getValueByKey(JSON.stringify(json), connectorName);
  if (!authDetails || !authDetails.connector_account_details) {
    throw new Error(`Cannot create ${connectorName}: creds missing or malformed`);
  }
});

Try / catch

cy.on('fail', (err) => {
  if (err.message.includes('Connector Create Call Failed')) {
    throw new Error(`Connector setup failed (${connectorName}) — check creds expiry and duplicates: ${err.message}`);
  }
  throw err;
});

Prevention

When it happens

Trigger: connector_account_details from creds.json rejected by the API (invalid/expired connector credentials, wrong auth shape); a duplicate connector already registered on the profile from a prior partial run; malformed frm_configs for payment_vas type; invalid profile_id (namespaced profile never created); missing payment_methods_enabled.

Common situations: Sandbox connector credentials expired (very common with acquirer test accounts); re-running a suite that failed midway and left a half-created connector; profilePrefix drift between the profile-create and connector steps; connectors-endpoint schema changes after a Hyperswitch upgrade.

Related errors


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