Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Backend] Standardize X-Request-ID header propagation across Express middlewares and error responses

Đang mở
#1,494 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 7 ngày

@Chinko21 đang làm issue này rồi.

Từ ngày 27/9/2026.

  • #1560 của @Chinko21 — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

backend drips-wave good-first-issue observability Stellar Wave

Overview

Distributed debugging requires tracing a request from client to server logs. Currently, incoming X-Request-ID headers are partially attached in some routes but omitted in error handlers.

Problem

  • When an API error occurs, client cannot report their request ID to support engineers because error responses omit X-Request-ID.

Proposed Changes

  1. Add an early middleware in backend/src/app.ts to assign or preserve req.id = req.headers['x-request-id'] || crypto.randomUUID().
  2. Ensure res.setHeader('X-Request-ID', req.id).
  3. Include requestId in error payloads returned by api-error.ts.

Acceptance Criteria

  • Every response includes X-Request-ID header.
  • Error responses include requestId property in JSON body.
  • Winston logs automatically append requestId.
Ngôn ngữ chính
TypeScript
Star
18
Fork
250
Merge trung bình
5 ngày 6 giờ
Pull request đã merge (30 ngày)
82

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của LabsCrypt/flowfi

Tất cả issue của LabsCrypt/flowfi

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.