{"record":{"id":"8d4352fc919d6082","repo":"juspay/hyperswitch","slug":"unsupported-connector-connectorid","errorCode":null,"errorMessage":"Unsupported connector: ${connectorId}","messagePattern":"Unsupported connector: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cypress-tests-v2/cypress/support/redirectionHandler.js","lineNumber":279,"sourceCode":"          );\n          cy.get(\".BankSearch_searchIcon__EcVO7\").click();\n          cy.get(\".BankSearch_bankWrapper__R5fUK\").click();\n          cy.get(\"._transactionId__primaryButton__nCa0r\").click();\n          cy.get(\".normal-3\").should(\"contain.text\", \"Kontoauswahl\");\n          break;\n        case \"sofort\":\n          break;\n        case \"trustly\":\n          break;\n        default:\n          throw new Error(\n            `Unsupported payment method type: ${payment_method_type}`\n          );\n      }\n      verifyUrl = false;\n      break;\n    default:\n      throw new Error(`Unsupported connector: ${connectorId}`);\n  }\n\n  cy.then(() => {\n    verifyReturnUrl(redirection_url, expected_url, verifyUrl);\n  });\n}\n\nfunction threeDsRedirection(redirection_url, expected_url, connectorId) {\n  cy.visit(redirection_url.href);\n  if (connectorId === \"adyen\") {\n    cy.get(\"iframe\")\n      .its(\"0.contentDocument.body\")\n      .within((body) => {\n        cy.get('input[type=\"password\"]').click();\n        cy.get('input[type=\"password\"]').type(\"password\");\n        cy.get(\"#buttonSubmit\").click();\n      });\n  } else if (","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/juspay/hyperswitch/blob/9b8b89dc378b62c9a6feda647bad4719d2de7699/cypress-tests-v2/cypress/support/redirectionHandler.js#L261-L297","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Print/inspect the exact connectorId reaching the switch (trim, casing) and compare it against the case labels above line 279","Add a case for the missing connector implementing its redirect verification, then break out of the switch","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","Keep the case list in sync whenever a connector is added or renamed in test configuration"],"exampleFix":"// before\ndefault:\n  throw new Error(`Unsupported connector: ${connectorId}`);\n\n// after (add the new connector, keep the throw as a guard)\ncase 'zeno':\n  // zeno redirects straight back to the return URL\n  verifyUrl = true;\n  break;\ndefault:\n  throw new Error(`Unsupported connector: ${connectorId}`);","handlingStrategy":"validation","validationCode":"// Before delegating to the redirection handler\nconst REDIRECT_SUPPORT = new Set([\n  'adyen', 'stripe', 'paypal', 'trustly', 'sofort', /* keep in sync with the switch */\n]);\nconst normalized = String(connectorId).trim().toLowerCase();\nif (!REDIRECT_SUPPORT.has(normalized)) {\n  cy.log(`No redirect verification implemented for connector: ${connectorId} - skipping`);\n  return;\n}\nHandlerForConnectorsWithRedirection(redirection_url, expected_url, normalized);","typeGuard":null,"tryCatchPattern":"// Only if you must tolerate a throw mid-command\ncy.on('fail', (err) => {\n  if (err.message.includes('Unsupported connector:')) {\n    /* mark test as skipped/pending for this connector */\n  }\n});","preventionTips":["Treat the switch's case list as the contract: update redirectionHandler whenever a connector is added or renamed","Normalize connectorId (trim/lowercase) before dispatch","Filter unsupported connectors out of the test matrix explicitly rather than relying on the default throw"],"tags":["cypress","e2e","connector","redirection","test-infrastructure"],"backgroundTag":null,"analyzedSha":"9b8b89dc378b62c9a6feda647bad4719d2de7699","analyzedAt":"2026-08-16T09:01:53.433Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}