β»οΈ Reproduction Steps
- Setup CopilotKit with local runtime
- Configure
onError in CopilotRuntime instance
- Add some
headers to the request
- Simulate a situation when an error is thrown
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
π Logs (Optional)