{"record":{"id":"770ffc1177328c24","repo":"ComposioHQ/composio","slug":"invalid","errorCode":"Invalid","errorMessage":"service must be a non-empty string","messagePattern":"service must be a non-empty string","errorType":"validation","errorClass":"KeyringError","httpStatus":null,"severity":"error","filePath":"ts/packages/cli-keyring/src/core/entry.ts","lineNumber":46,"sourceCode":"  readonly service: string;\n  readonly user: string;\n  readonly modifiers: EntryModifiers;\n\n  /**\n   * Override the store just for this entry (e.g. tests). When `null`,\n   * the process-global default store is resolved on every call so that\n   * `setDefaultStore` / `unsetDefaultStore` take effect immediately.\n   */\n  private readonly overrideStore: CredentialStore | null;\n\n  constructor(\n    service: string,\n    user: string,\n    modifiers: EntryModifiers = {},\n    overrideStore: CredentialStore | null = null\n  ) {\n    if (service.length === 0) {\n      throw new KeyringError({\n        kind: 'Invalid',\n        param: 'service',\n        reason: 'service must be a non-empty string',\n      });\n    }\n    if (user.length === 0) {\n      throw new KeyringError({\n        kind: 'Invalid',\n        param: 'user',\n        reason: 'user must be a non-empty string',\n      });\n    }\n    this.service = service;\n    this.user = user;\n    this.modifiers = modifiers;\n    this.overrideStore = overrideStore;\n  }\n","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/cli-keyring/src/core/entry.ts#L28-L64","documentation":"The cli-keyring Entry constructor rejects an empty service string. The service name identifies which credential namespace to use, so an empty value is invalid (KeyringError kind 'Invalid', param 'service').","triggerScenarios":"Constructing new Entry('', user) or passing a service that is an empty string (e.g. from an unset config value).","commonSituations":"Defaulting a missing env/config variable to '' and passing it as the service name; refactors that drop the service constant.","solutions":["Pass a non-empty service identifier (e.g. 'composio-cli')","Default empty config values to a concrete service name before constructing the Entry"],"exampleFix":"// before\nnew Entry(config.service ?? '', user);\n// after\nnew Entry(config.service || 'composio-cli', user);","handlingStrategy":"validation","validationCode":"if (!service) throw new TypeError('service required');\nnew Entry(service, user);","typeGuard":"const isNonEmpty = (s: unknown): s is string => typeof s === 'string' && s.length > 0;","tryCatchPattern":"catch (e) { if (e instanceof KeyringError && e.kind === 'Invalid') { /* fix inputs */ } else throw e; }","preventionTips":["Validate config-derived strings before keyring calls","Default empty values to concrete names"],"tags":["keyring","validation","typescript"],"backgroundTag":"empty-required-argument","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}