Huggingface.js documentation

Class: InferenceClientHubApiError

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Class: InferenceClientHubApiError

Được ném ra khi yêu cầu HTTP đến hub thất bại, ví dụ do sự cố API hoặc lỗi máy chủ.

Hệ thống phân cấp

  • InferenceClientHttpRequestError

    ↳ InferenceClientHubApiError

Hàm khởi tạo

constructor

• mới InferenceClientHubApiError(message, httpRequest, httpResponse): InferenceClientHubApiError

Tham số

TênLoại
messagestring
httpRequestHttpRequest
httpResponseHttpResponse

Trả về

InferenceClientHubApiError

Ghi đè

InferenceClientHttpRequestError.constructor

Được định nghĩa trong

inference/src/errors.ts:75

Thuộc tính

nguyên nhân

• nguyên nhân Optional: unknown

Kế thừa từ

InferenceClientHttpRequestError.cause

Được định nghĩa trong

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26


httpRequest

• httpRequest: HttpRequest

Kế thừa từ

InferenceClientHttpRequestError.httpRequest

Được định nghĩa trong

inference/src/errors.ts:41


httpResponse

• httpResponse: HttpResponse

Kế thừa từ

InferenceClientHttpRequestError.httpResponse

Được định nghĩa trong

inference/src/errors.ts:42


message

• message: string

Kế thừa từ

InferenceClientHttpRequestError.message

Được định nghĩa trong

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1077


name

• name: string

Kế thừa từ

InferenceClientHttpRequestError.name

Được định nghĩa trong

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1076


stack

• stack Optional: string

Kế thừa từ

InferenceClientHttpRequestError.stack

Được định nghĩa trong

doc-internal/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts:1078


prepareStackTrace

▪ Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Ghi đè tùy chọn cho việc định dạng vết chồng

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Khai báo kiểu

▸ (err, stackTraces): any

Tham số
TênLoại
errError
stackTracesCallSite[]
Trả về

any

Kế thừa từ

InferenceClientHttpRequestError.prepareStackTrace

Được định nghĩa trong

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:11


stackTraceLimit

▪ Static stackTraceLimit: number

Kế thừa từ

InferenceClientHttpRequestError.stackTraceLimit

Được định nghĩa trong

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:13

Phương thức

captureStackTrace

▸ captureStackTrace(targetObject, constructorOpt?): void

Tạo thuộc tính .stack trên một đối tượng đích

Tham số

TênLoại
targetObjectobject
constructorOpt?Function

Trả về

void

Kế thừa từ

InferenceClientHttpRequestError.captureStackTrace

Được định nghĩa trong

inference/node_modules/.pnpm/@types+node@18.13.0/node_modules/@types/node/globals.d.ts:4

Update on GitHub