{"record":{"id":"81fbb4a3d23c37ff","repo":"bettercap/bettercap","slug":"expected-str","errorCode":null,"errorMessage":"Expected \"${str}\".","messagePattern":"Expected \"(.+?)\"\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/ui/ui/vendor.js","lineNumber":76062,"sourceCode":"            var children = this.parseChildren();\n            segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                new UrlSegmentGroup([], children);\n            this.consumeOptional('//');\n        }\n        return segments;\n    };\n    UrlParser.prototype.peekStartsWith = function (str) { return this.remaining.startsWith(str); };\n    // Consumes the prefix when it is present and returns whether it has been consumed\n    UrlParser.prototype.consumeOptional = function (str) {\n        if (this.peekStartsWith(str)) {\n            this.remaining = this.remaining.substring(str.length);\n            return true;\n        }\n        return false;\n    };\n    UrlParser.prototype.capture = function (str) {\n        if (!this.consumeOptional(str)) {\n            throw new Error(\"Expected \\\"\" + str + \"\\\".\");\n        }\n    };\n    return UrlParser;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar Tree = /** @class */ (function () {\n    function Tree(root) {\n        this._root = root;\n    }\n    Object.defineProperty(Tree.prototype, \"root\", {\n        get: function () { return this._root.value; },","sourceCodeStart":76044,"sourceCodeEnd":76080,"githubUrl":"https://github.com/bettercap/bettercap/blob/8eca2820f3c41d2004434ed5a291d87462caeeb7/modules/ui/ui/vendor.js#L76044-L76080","documentation":"Angular's UrlParser parses a serialized URL string token by token; this is the generic expectation helper that throws when the next characters of the remaining string do not match the syntactic element the parser needs (a delimiter like '/', '(', ')', ':' or a segment) — i.e. the URL string is malformed for the router grammar.","triggerScenarios":"Thrown at modules/ui/ui/vendor.js:76062 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the malformed routerLink or URL string that fails to parse","Check for unbalanced parentheses in auxiliary outlet syntax and missing outlet names","Avoid manually constructing URLs with characters reserved by the router grammar; use router.serializeUrl"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8eca2820f3c41d2004434ed5a291d87462caeeb7","analyzedAt":"2026-09-02T12:49:00.712Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}