Skip to content

feat: unify API response envelopes and trace propagation#11

Open
Cai-Tang-www wants to merge 1 commit into
mainfrom
feat/response-trace-issue-2
Open

feat: unify API response envelopes and trace propagation#11
Cai-Tang-www wants to merge 1 commit into
mainfrom
feat/response-trace-issue-2

Conversation

@Cai-Tang-www

Copy link
Copy Markdown
Owner

Summary

  • add unified response envelope and stable string error codes
  • add request trace middleware, request logging, and global error handling
  • propagate trace_id through HTTP, Kafka run messages, and worker logs
  • migrate JSON handlers and auth/rbac middleware to unified responses
  • convert /api/chat SSE payloads to envelope-based chunk/done/error events
  • add tests for response mapping, trace middleware, SSE behavior, auth envelopes, and Kafka trace propagation
  • document response contract, SSE format, and error code table in README

Verification

  • go test ./...
  • go build ./...

Scope

Issue #2: 统一错误码与响应规范(含 trace_id)

@fennoai

fennoai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Configuration Required

No API key has been configured for this organization. XGopilot requires an API key to process requests.

Please visit the Settings page to configure your API key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant