Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bug: Suppress CSRF token error logging in Electron environments #20914

Open
Labels
siteArea: frontend dashboard
@EhabY

Description

@EhabY

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:

coder/site/src/api/api.ts

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    siteArea: frontend dashboard

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp