{"record":{"id":"2185274765b7ef55","repo":"koala73/worldmonitor","slug":"invalid-x-account-id","errorCode":null,"errorMessage":"invalid X account ID","messagePattern":"invalid X account ID","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"shared/company-monitoring-contract.ts","lineNumber":191,"sourceCode":"  const type = Object.prototype.hasOwnProperty.call(COMPANY_CLAIM_TYPE_BY_INPUT, input.type)\n    ? COMPANY_CLAIM_TYPE_BY_INPUT[input.type]\n    : undefined;\n  if (!type) throw new Error('company claim type is invalid');\n\n  let value: string;\n  switch (type) {\n    case 'alias':\n      value = assertPlainText(input.value, 'claim.value', COMPANY_MONITORING_LIMITS.maxAliasBytes);\n      break;\n    case 'domain':\n      value = normalizeDomain(input.value, 0);\n      break;\n    case 'legal_identifier':\n      value = assertPlainText(input.value, 'claim.value', COMPANY_MONITORING_LIMITS.maxIdentifierBytes);\n      break;\n    case 'x_account_id':\n      value = assertPlainText(input.value, 'claim.value', COMPANY_MONITORING_LIMITS.maxXAccountIdBytes);\n      if (!X_ACCOUNT_ID.test(value)) throw new Error('invalid X account ID');\n      break;\n    case 'x_handle':\n      value = normalizeXHandle(input.value, 0);\n      break;\n    case 'location':\n      value = assertPlainText(input.value, 'claim.value', COMPANY_MONITORING_LIMITS.maxLocationBytes);\n      break;\n    case 'customer_reference':\n      value = assertPlainText(input.value, 'claim.value', COMPANY_MONITORING_LIMITS.maxCustomerReferenceBytes);\n      break;\n  }\n  return { type, value };\n}\n\nexport interface MonitoredCompanyInput {\n  name: string;\n  domicileCountry: string;\n  aliases?: string[];","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/koala73/worldmonitor/blob/eeab0a219fce0f02a00603b532dbae9041b934ac/shared/company-monitoring-contract.ts#L173-L209","documentation":"Contract validation error from normalizeCompanyClaimInput: the claim type resolved to 'x_account_id' but the value does not match the expected X account ID format. Each claim type has its own value validation; this is the x_account_id branch failing.","triggerScenarios":"Thrown at shared/company-monitoring-contract.ts:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send the numeric X account ID string in the expected canonical format","Copy the ID directly from the platform rather than a display handle"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eeab0a219fce0f02a00603b532dbae9041b934ac","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}