-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on('error', () => ...) event does not fire on APIUserAbortError #526
Labels
bug
Something isn't working
Comments
Sorry about that. We hope to fix this when we can. In the meantime, you can listen to Out of curiosity, is there a reason you'd like |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
From the
error
event documentation:However, I found that it is not fired on abort. Instead, the way to gracefully handle an abort seems to be with the
finalContent
method (there may be other ways, I didn't test). I found this out from looking at the tests.To Reproduce
This test already has the minimal setup to reproduce. Simply add an assertion to expect
emittedError
to be present after aborting.Code snippets
No response
OS
macOS
Node version
20.9.0
Library version
4.18.0
The text was updated successfully, but these errors were encountered: