Skip to content

feat(backend): propagate X-Request-ID header on all responses using requestContext.ts #443

Description

@Dev-AdeTutu

Summary

requestContext.ts already generates per-request IDs but they are never sent back in the response. Attaching X-Request-ID to every response makes distributed tracing and client-side error reporting much easier.

Acceptance Criteria

  • Every HTTP response includes X-Request-ID: <uuid>
  • The ID is either taken from the incoming X-Request-ID header (if present) or generated fresh
  • Middleware logs the request ID alongside method and path
  • Works via requestLogger.ts or a new standalone middleware

Files to touch

  • backend/src/lib/requestContext.ts
  • backend/src/middleware/requestLogger.ts

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions