- Notifications
You must be signed in to change notification settings - Fork1.1k
Open
Description
ThegetConfiguredAxiosInstance function logs "CSRF token not found" errors in the VS Code extension host on every invocation. This occurs because the following code attempts to access browser-specific APIs that don't exist in Electron environments:
Lines 2771 to 2774 in823009d
| // Do not write error logs if we are in a FE unit test. | |
| if(!process.env.JEST_WORKER_ID&&!process.env.VITEST){ | |
| console.error("CSRF token not found"); | |
| } |
Proposed Solution:
Conditionally suppress the error logging when running in Electron environments by checking ifprocess.versions.electron is truthy. Alternatively, check ifdocument is undefined, though the Electron check is more explicit.
This error is harmless but is polluting the logs and makes debugging issues a tiny bit harder.