Skip to content

Commit dfa70b0

Browse files
fix: use correct error class when raising errors from within streams
1 parent 9b676aa commit dfa70b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/openai/internal/stream.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Stream
3838
else
3939
"An error occurred during streaming"
4040
end
41-
err = OpenAI::Errors::APIError.for(
41+
err = OpenAI::Errors::APIStatusError.for(
4242
url: @url,
4343
status: @status,
4444
body: data,

0 commit comments

Comments
 (0)