{"record":{"id":"12c3c8d816e0ea62","repo":"juspay/hyperswitch","slug":"connector-create-call-failed-response-body-error","errorCode":null,"errorMessage":"Connector Create Call Failed ${response.body.error.message}","messagePattern":"Connector Create Call Failed (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cypress-tests/cypress/support/commands.js","lineNumber":1599,"sourceCode":"        }).then((response) => {\n          logRequestId(response.headers[\"x-request-id\"]);\n\n          cy.wrap(response).then(() => {\n            if (response.status === 200) {\n              expect(getOriginalConnectorName(connectorName)).to.equal(\n                response.body.connector_name\n              );\n              globalState.set(\n                `${mcaPrefix}Id`,\n                response.body.merchant_connector_id\n              );\n            } else {\n              cy.task(\n                \"cli_log\",\n                \"response status -> \" + JSON.stringify(response.status)\n              );\n\n              throw new Error(\n                `Connector Create Call Failed ${response.body.error.message}`\n              );\n            }\n          });\n        });\n      }\n    );\n  }\n);\n\nCypress.Commands.add(\n  \"createConnectorCallTest\",\n  (\n    connectorType,\n    createConnectorBody,\n    payment_methods_enabled,\n    globalState,\n    profilePrefix = \"profile\",","sourceCodeStart":1581,"sourceCodeEnd":1617,"githubUrl":"https://github.com/juspay/hyperswitch/blob/9b8b89dc378b62c9a6feda647bad4719d2de7699/cypress-tests/cypress/support/commands.js#L1581-L1617","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the cli_log line just above the error (it prints the HTTP status) plus the embedded server message","Verify the connector's creds in creds.json are valid for the target environment — re-issue sandbox keys if expired","Check for a duplicate connector on the profile and delete or reuse it","Confirm the profile under `${profilePrefix}Id` exists and belongs to the same merchant","Correlate via the logged x-request-id in server logs"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"cy.readFile(globalState.get('connectorAuthFilePath')).then((json) => {\n  const { authDetails } = getValueByKey(JSON.stringify(json), connectorName);\n  if (!authDetails || !authDetails.connector_account_details) {\n    throw new Error(`Cannot create ${connectorName}: creds missing or malformed`);\n  }\n});","typeGuard":null,"tryCatchPattern":"cy.on('fail', (err) => {\n  if (err.message.includes('Connector Create Call Failed')) {\n    throw new Error(`Connector setup failed (${connectorName}) — check creds expiry and duplicates: ${err.message}`);\n  }\n  throw err;\n});","preventionTips":["Rotate sandbox connector credentials on a schedule","Clean up half-created connectors between runs","Decode the cli_log status line: 400 creds/schema, 401 api-key, 500 backend"],"tags":["cypress","hyperswitch","connectors","credentials","api-request"],"backgroundTag":null,"analyzedSha":"9b8b89dc378b62c9a6feda647bad4719d2de7699","analyzedAt":"2026-08-16T09:01:53.433Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}