Thanks to visit codestin.com
Credit goes to github.com

Skip to content

πŸ› Bug: Error handlers missing request headers (and more)Β #2716

@hejtmii

Description

@hejtmii

♻️ Reproduction Steps

  1. Setup CopilotKit with local runtime
  2. Configure onError in CopilotRuntime instance
  3. Add some headers to the request
  4. Simulate a situation when an error is thrown
  5. onError doesn't provide request headers in errorEvent.context.request.headers

We need it to pass our own context data (mainly user ID) to the error handler, to be able to connect the error log to actions of particular user

βœ… Expected Behavior

onError gets all possible data (or at least headers) it exposes in its contract from the request

❌ Actual Behavior

onError handler is missing request data, primarily headers

𝌚 CopilotKit Version

1.10.6

πŸ“„ Logs (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions