Skip to content

Commit

Permalink
fix: V2Stub type
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniAkash committed Feb 8, 2024
1 parent 3b328c2 commit 62e29ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/auth/stub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { credentials, Metadata, ServiceError, status } from "@grpc/grpc-js";
import { V2Client } from "clarifai-nodejs-grpc/proto/clarifai/api/service_grpc_pb";
import { ClarifaiAuthHelper } from "./helper";
import { StatusCode } from "clarifai-nodejs-grpc/proto/clarifai/api/status/status_code_pb";
import { V2Stub } from "./register";

const throttleStatusCodes = new Set([
StatusCode.CONN_THROTTLED,
Expand Down Expand Up @@ -100,7 +101,7 @@ export class RetryStub extends AuthorizedStub {
export function createStub(
authHelper: ClarifaiAuthHelper,
maxRetryAttempts: number = 10,
): AuthorizedStub | RetryStub {
): V2Stub {
/*
Create client stub that handles authorization and basic retries for
unavailable or throttled connections.
Expand Down

0 comments on commit 62e29ab

Please sign in to comment.