Huggingface.js documentation

Класс: InferenceClientHubApiError

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Класс: InferenceClientHubApiError

Возникает, если HTTP-запрос к хабу не выполняется, например, из-за проблем с API или ошибок сервера.

Иерархия

  • InferenceClientHttpRequestError

    ↳ InferenceClientHubApiError

Конструкторы

constructor

• new InferenceClientHubApiError(message, httpRequest, httpResponse): InferenceClientHubApiError

Параметры

ИмяТип
messagestring
httpRequestHttpRequest
httpResponseHttpResponse

Возвращает

InferenceClientHubApiError

Переопределения

InferenceClientHttpRequestError.constructor

Определено в

inference/src/errors.ts:75

Свойства

причина

• Optional причина: unknown

Наследуется от

InferenceClientHttpRequestError.cause

Определено в

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


httpRequest

• httpRequest: HttpRequest

Наследуется от

InferenceClientHttpRequestError.httpRequest

Определено в

inference/src/errors.ts:41


httpResponse

• httpResponse: HttpResponse

Наследуется от

InferenceClientHttpRequestError.httpResponse

Определено в

inference/src/errors.ts:42


сообщение

• message: string

Наследуется от

InferenceClientHttpRequestError.message

Определено в

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


name

• name: string

Наследуется от

InferenceClientHttpRequestError.name

Определено в

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


стек

• Optional стек: string

Наследуется от

InferenceClientHttpRequestError.stack

Определено в

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

Необязательное переопределение для форматирования трассировок стека

See

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

Объявление типа

▸ (err, stackTraces): any

Параметры
ИмяТип
errError
stackTracesCallSite[]
Возвращает

any

Наследуется от

InferenceClientHttpRequestError.prepareStackTrace

Определено в

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


stackTraceLimit

▪ Static stackTraceLimit: number

Наследуется от

InferenceClientHttpRequestError.stackTraceLimit

Определено в

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

Методы

captureStackTrace

▸ captureStackTrace(targetObject, constructorOpt?): void

Создание свойства .stack на целевом объекте

Параметры

ИмяТип
targetObjectobject
constructorOpt?Function

Возвращает

void

Наследуется от

InferenceClientHttpRequestError.captureStackTrace

Определено в

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

Update on GitHub