googleapis / googleapis/nodejs-agentplatform
ClientError class missing code and status properties in stackTrace
- Dominant language
- TypeScript
- Stars
- 182
- Forks
- 69
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 10
Description
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:
```typescript
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:
```typescript
{
"name": "ClientError",
"stackTrace": {
"code": 400,
"status": "INVALID_ARGUMENT"
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.