{"record":{"id":"ade76a117b579ea8","repo":"pentaho/pentaho-kettle","slug":"argument-id-is-required","errorCode":null,"errorMessage":"Argument 'id' is required.","messagePattern":"Argument 'id' is required\\.","errorType":"validation","errorClass":"pentaho.lang.ArgumentRequiredError","httpStatus":null,"severity":"error","filePath":"plugins/core-ui/src/main/resources/app/pentaho/module/util.js","lineNumber":155,"sourceCode":"     * Parses a module identifier produced by the Web Package system.\n     *\n     * It is assumed to have a structure similar to:\n     *\n     * * `@hitachivantara/pentaho-core@1.2.20/pentaho/visual/models/Bar`\n     *\n     * The package name and version part is optional and when not present,\n     * the whole `package` property will be returned null.\n     *\n     * @param {string} id - The module identifier.\n     * @return {({package: ?({name: string, version}), name: string})} The parsed module information.\n     *\n     * @throws {pentaho.lang.ArgumentInvalidError} When the module identifier has an invalid syntax.\n     *\n     * @private\n     */\n    parseId: function(id) {\n      if(id == null) {\n        throw new ArgumentRequiredError(\"id\");\n      }\n\n      var match = reVersionedModuleId.exec(id);\n      // assert match !== null\n      return {\n        package: match[1] ? {name: match[1], version: match[2]} : null,\n        name: match[3]\n      };\n    }\n  };\n\n  return util;\n\n  /**\n   * Gets a module map used to resolve the dependencies of a given module.\n   *\n   * @param {?string|undefined} forId - The identifier of the module for which the module map is desired.\n   *","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/core-ui/src/main/resources/app/pentaho/module/util.js#L137-L173","documentation":"util.parseId parses a versioned module identifier string into its package/version parts. Passing null or undefined throws ArgumentRequiredError('id'). It is the private entry point for all id parsing in the module util.","triggerScenarios":"Calling pentaho.module.util.parseId() or parseId(null/undefined); passing a variable that failed to load from config or a lookup map.","commonSituations":"Module metadata lookups where the id came from an optional config field; iterating collections that contain null placeholders; tests omitting the id.","solutions":["Always pass a non-null id string to parseId.","Default or short-circuit before the call: if(id) parsed = util.parseId(id).","Fix the upstream source of the id (config, descriptor, lookup) so it cannot be null."],"exampleFix":"// before\nvar parts = util.parseId(id);\n// after\nif(id != null) { var parts = util.parseId(id); }","handlingStrategy":"validation","validationCode":"if (id == null) { id = defaultModuleId; }\nvar parsed = util.parseId(id);","typeGuard":"function isModuleId(x) { return typeof x === 'string' && x.length > 0; }","tryCatchPattern":"try { return util.parseId(id); } catch (e) { if (/Argument 'id' is required/.test(e.message)) { return null; } throw e; }","preventionTips":["Default null ids at the config/lookup boundary.","Never iterate id collections that may contain null placeholders without filtering.","Validate ids are non-empty strings before any module util call."],"tags":["argument-required","module-id","null-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}