Skip to content
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

ClientError class missing code and status properties in stackTrace #432

Open
marius-ciocoiu opened this issue Sep 30, 2024 · 0 comments
Open
Labels
api: aiplatform Issues related to the googleapis/nodejs-vertexai API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@marius-ciocoiu
Copy link

The ClientError class in the Vertex AI SDK doesn't include code and status properties in its type definition, despite these properties being present in the actual error object thrown by the API.

Current Behavior

The ClientError class is defined as:

declare class ClientError extends Error {
    readonly stackTrace?: Error;
    constructor(message: string, stackTrace?: Error);
}

However, when catching errors from the API, the actual error object includes a stackTrace property with code and status:

{
  "name": "ClientError",
  "stackTrace": {
    "code": 400,
    "status": "INVALID_ARGUMENT"
  }
}
@marius-ciocoiu marius-ciocoiu added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 30, 2024
@product-auto-label product-auto-label bot added the api: aiplatform Issues related to the googleapis/nodejs-vertexai API. label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: aiplatform Issues related to the googleapis/nodejs-vertexai API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant