Skip to content

[Bug] Replace raw API error JSON with user-friendly alerts on Research page #282

Description

@Linjie-top

What happened?

Currently, when the backend API (port 8000) is unreachable, the Research page displays a raw JSON error message: {"detail":"Upstream API unreachable...", "error":"fetch failed"}.

What did you expect?

Display a clear, human-readable message: " 你的API key未填写“或别的 展示正确的原因

Steps to reproduce

  1. 运行网页前端且不配置api key
  2. 到research page可以看到

Logs / stack trace

Commit / branch

No response

Environment

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions