{"record":{"id":"f6559d8478427cb4","repo":"hpyhacking/peatio","slug":"unbalanced-capture-group-in-route","errorCode":null,"errorMessage":"Unbalanced capture group in route '{}'","messagePattern":"Unbalanced capture group in route '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/assets/javascripts/lib/angular-ui-router.js","lineNumber":830,"sourceCode":" *   x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * </pre>\n *\n * @param {string} path  The URL path to match, e.g. `$location.path()`.\n * @param {Object} searchParams  URL search parameters, e.g. `$location.search()`.\n * @returns {Object}  The captured parameter values.\n */\nUrlMatcher.prototype.exec = function (path, searchParams) {\n  var m = this.regexp.exec(path);\n  if (!m) return null;\n  searchParams = searchParams || {};\n\n  var params = this.parameters(), nTotal = params.length,\n    nPath = this.segments.length - 1,\n    values = {}, i, cfg, param;\n\n  if (nPath !== m.length - 1) throw new Error(\"Unbalanced capture group in route '\" + this.source + \"'\");\n\n  for (i = 0; i < nPath; i++) {\n    param = params[i];\n    cfg = this.params[param];\n    values[param] = cfg.$value(m[i + 1]);\n  }\n  for (/**/; i < nTotal; i++) {\n    param = params[i];\n    cfg = this.params[param];\n    values[param] = cfg.$value(searchParams[param]);\n  }\n\n  return values;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#parameters","sourceCodeStart":812,"sourceCodeEnd":848,"githubUrl":"https://github.com/hpyhacking/peatio/blob/dab8641137c008928c835409342519bfef4eae7f/app/assets/javascripts/lib/angular-ui-router.js#L812-L848","documentation":"Error \"Unbalanced capture group in route '{}'\" thrown in hpyhacking/peatio.","triggerScenarios":"Thrown at app/assets/javascripts/lib/angular-ui-router.js:830 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Balance the parentheses in the route's regular expression: close every capture group, and escape literal parentheses as \\( and \\)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dab8641137c008928c835409342519bfef4eae7f","analyzedAt":"2026-08-23T09:59:18.005Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}