{"record":{"id":"50d59dfc318279b9","repo":"continuedev/continue","slug":"empty-certificate-found-at-path","errorCode":null,"errorMessage":"Empty certificate found at ${path}","messagePattern":"Empty certificate found at (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/fetch/src/certs.ts","lineNumber":100,"sourceCode":"    }\n    const certContent = getCertificateContent(path);\n    this._customCerts.set(path, certContent);\n    return certContent;\n  }\n\n  async getAllCachedCustomCerts(\n    caBundlePath: string[] | string,\n  ): Promise<string[]> {\n    const paths = Array.isArray(caBundlePath) ? caBundlePath : [caBundlePath];\n    const certs: string[] = [];\n    await Promise.all(\n      paths.map(async (path) => {\n        try {\n          const certContent = await this.getCachedCustomCert(path);\n          if (certContent) {\n            certs.push(certContent);\n          } else if (process.env.VERBOSE_FETCH) {\n            console.warn(`Empty certificate found at ${path}`);\n          }\n        } catch (error) {\n          if (process.env.VERBOSE_FETCH) {\n            console.error(\n              `Error loading custom certificate from ${path}:`,\n              error,\n            );\n          }\n        }\n      }),\n    );\n    return certs;\n  }\n\n  async getCa(caBundlePath: undefined | string | string[]): Promise<string[]> {\n    if (!caBundlePath) {\n      return this.fixedCa;\n    }","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/packages/fetch/src/certs.ts#L82-L118","documentation":"While aggregating custom TLS certificates, getAllCachedCustomCerts maps over configured cert paths; if a path exists but resolves to empty content (getCachedCustomCert returns falsy), this warning is logged — and only when VERBOSE_FETCH is set, otherwise it is silent. The empty cert is simply not added to the bundle.","triggerScenarios":"Configuring a custom CA bundle path whose file is zero bytes, contains only whitespace, or was truncated; running with VERBOSE_FETCH=1 to see the diagnostic.","commonSituations":"Empty/truncated .pem created by a failed curl, a mount point with an unreadable file, or a CI cache that produced a 0-byte cert; corporate MITM proxy CA setup where the injected file is empty.","solutions":["Inspect the file at the reported path: `ls -la <path>` and `wc -c <path>` to confirm it is empty","Restore or regenerate the PEM bundle so it contains a full -----BEGIN CERTIFICATE----- block","Remove the path from custom certificate configuration if it is no longer needed","Set VERBOSE_FETCH=1 while debugging to surface these otherwise-silent skips"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"for (const p of certPaths) {\n  const stat = await fs.stat(p);\n  if (stat.size === 0) throw new Error(`Empty certificate file: ${p}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate cert files are non-empty PEMs at deploy time","Run with VERBOSE_FETCH=1 when diagnosing TLS issues","Include a -----BEGIN CERTIFICATE----- sanity check in config validation"],"tags":["tls","certificates","fetch","config"],"backgroundTag":"empty-certificate-file","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}