Skip to content

[Bug][UI] Homepage white screen when Axios error has no response object #770

@lhy8888

Description

@lhy8888

Contact Details

security-automation@local

This bug is related to UI or API?

UI

What happened?

After deployment, homepage can render blank in browser. F12 console shows:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'status')

Root cause is in frontend global request interceptor (cmdb-ui/src/utils/request.js):

  • code path uses error.response.status without guarding when error.response is undefined
  • this happens on network failures / CORS / backend-not-ready cases, causing uncaught runtime exception and white page

Expected behavior:

  • interceptor must safely handle missing error.response and error.config
  • UI should show generic request error and continue rendering instead of crashing

Fix submitted:

  • normalized response/config/status access with safe defaults
  • replaced direct chained access to guarded variables
  • adjusted route/path read to avoid undefined property access

Patch commit:

  • 2dd019c47 (fix(ui): guard axios error object access to prevent blank-page crash)

PR containing fix:

Version

newest

What browsers are you seeing the problem on?

Chrome

Relevant log output

app.ea91c363.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'status')
    at v (app.ea91c363.js:1:2247617)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions