-
Notifications
You must be signed in to change notification settings - Fork 346
Closed as not planned
Closed as not planned
Copy link
Labels
needs-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.questionCategory: The issue is seeking information about the library or its usage.Category: The issue is seeking information about the library or its usage.
Description
Describe the bug
When using CreateResponseStreamingAsync() and an error occurs the object of type StreamingResponseErrorUpdate should be providing access to the error but it doesn't seem to.
I don't know if it's related, but the Status property is empty too when I receive StreamingResponseOutputItemAddedUpdate messages.
Steps to reproduce
- Perform a query using the WebSearch tool
- Use a streamed response
- Cause an error to occur and try to fetch information about it
Code snippets
var client = openAi.GetOpenAIResponseClient("gpt-5-mini");
var userQuestion = "";
var options = new ResponseCreationOptions {
Instructions = "...",
Tools = {
ResponseTool.CreateWebSearchTool(null, WebSearchContextSize.Low)
}
};
await foreach (var update in client.CreateResponseStreamingAsync(userInputText: userQuestion, options))
{
switch (update)
{
case StreamingResponseErrorUpdate error:
// error.Code and error.Message are blank, but if I dig into the private fields the error is there (such as a throttle error) I just don't have access to it.
Console.WriteLine($"Error: [{error.Code}] {error.Message}");
break;
}
}OS
Windows
.NET version
9.0
Library version
2.3.0
Metadata
Metadata
Assignees
Labels
needs-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.questionCategory: The issue is seeking information about the library or its usage.Category: The issue is seeking information about the library or its usage.