{"record":{"id":"d94b4d019b845245","repo":"xai-org/x-algorithm","slug":"argument-entity-type-must-be-provided-support-d94b4d","errorCode":null,"errorMessage":"Argument [--entity-type] must be provided. Supported options [${EntityType.SemanticCore.name}, ${EntityType.Hashtag.name}]","messagePattern":"Argument \\[--entity-type\\] must be provided\\. Supported options \\[(.+?), (.+?)\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"simclusters/simclusters_v2/scalding/embedding/LocaleEntitySimClustersEmbeddingsJob.scala","lineNumber":344,"sourceCode":"                      } else {\n                        (entityId, (userId, (entity, score)))\n                      }\n                    case _ =>\n                      throw new IllegalArgumentException(\n                        \"Job config specified EntityType.SemanticCore, but non-semantic core entity was found.\")\n                  }\n              }.hashJoin(entityIdsToKeep.asKeys).values.map {\n                case ((userId, (entity, score)), _) => (userId, (entity, score))\n              }\n          case _ =>\n            getEntityUserMatrix(entityRealGraphSource, jobConfig.halfLife, EntityType.SemanticCore)\n              .map { case (entity, (userId, score)) => (userId, (entity, score)) }\n        }\n      case EntityType.Hashtag =>\n        getEntityUserMatrix(entityRealGraphSource, jobConfig.halfLife, EntityType.Hashtag)\n          .map { case (entity, (userId, score)) => (userId, (entity, score)) }\n      case _ =>\n        throw new IllegalArgumentException(\n          s\"Argument [--entity-type] must be provided. Supported options [${EntityType.SemanticCore.name}, ${EntityType.Hashtag.name}]\")\n    }\n\n  def toSimClustersEmbeddingId(\n    modelVersion: ModelVersion\n  ): ((Entity, String), ScoreType.ScoreType) => SimClustersEmbeddingId = {\n    case ((Entity.SemanticCore(SemanticCoreEntity(entityId, _)), lang), ScoreType.FavScore) =>\n      SimClustersEmbeddingId(\n        EmbeddingType.FavBasedSematicCoreEntity,\n        modelVersion,\n        InternalId.LocaleEntityId(LocaleEntityId(entityId, lang)))\n    case ((Entity.SemanticCore(SemanticCoreEntity(entityId, _)), lang), ScoreType.FollowScore) =>\n      SimClustersEmbeddingId(\n        EmbeddingType.FollowBasedSematicCoreEntity,\n        modelVersion,\n        InternalId.LocaleEntityId(LocaleEntityId(entityId, lang)))\n    case ((Entity.SemanticCore(SemanticCoreEntity(entityId, _)), lang), ScoreType.LogFavScore) =>\n      SimClustersEmbeddingId(","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/simclusters/simclusters_v2/scalding/embedding/LocaleEntitySimClustersEmbeddingsJob.scala#L326-L362","documentation":"getEntityUserMatrix in LocaleEntitySimClustersEmbeddingsJob only handles EntityType.SemanticCore and EntityType.Hashtag. Any other EntityType value (or an unset/default value) reaches the catch-all and throws, telling the operator which --entity-type values are supported.","triggerScenarios":"Calling the job with --entity-type set to anything other than SemanticCore or Hashtag, or omitting it when the default resolves to an unsupported value.","commonSituations":"Typos in the --entity-type argument; adding a new EntityType enum member without extending this job; reusing args from a different embedding job.","solutions":["Pass --entity-type SemanticCore or --entity-type Hashtag explicitly","If a new entity type is needed, add a case building its entity-user matrix","Validate entity-type at config parse time (see EntityEmbeddingUtil.apply) for a clearer, earlier error"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"val supported = Set(EntityType.SemanticCore.name, EntityType.Hashtag.name)\nrequire(supported(args(\"entity-type\")), s\"--entity-type must be one of $supported\")","typeGuard":"def isValidEntityType(s: String): Boolean =\n  s == EntityType.SemanticCore.name || s == EntityType.Hashtag.name","tryCatchPattern":null,"preventionTips":["Always pass --entity-type explicitly in job templates","Print supported values in job usage docs"],"tags":["scala","simclusters","cli-args","invalid-argument"],"backgroundTag":"missing-or-invalid-cli-argument","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}