-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add a new VertexAI error type #8240
Conversation
🦋 Changeset detectedLatest commit: 93588d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
7594331
to
5fb071b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this looks like a lot of comments but the core of this PR was pretty solid, it's a big rewrite of the whole error architecture, thanks for putting in all the work investigating and trying different approaches.
3b4301a
to
c3a3037
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One more real comment and some nits.
a6b28b5
to
93588d7
Compare
VertexAIError
so that users caninstanceof
the errors from the VertexAI SDK.status
,statusText
,errorDetails
) (mirroring google-gemini/generative-ai-js@111e970)ErrorFactory
towards our new error typeVertexAIErrorCode.ERROR
to align with the generic error in the Google AI SDKGoogleGenerativeAIError
Testing
I tested this in a React application in Chrome and Safari, and in a Node project.
instanceof
and the stack trace works in these environments.Error output in different environments
Safari
Chrome
Node