Huggingface.js documentation
Класс: InferenceClientHubApiError
Класс: InferenceClientHubApiError
Возникает, если HTTP-запрос к хабу не выполняется, например, из-за проблем с API или ошибок сервера.
Иерархия
InferenceClientHttpRequestError↳
InferenceClientHubApiError
Конструкторы
constructor
• new InferenceClientHubApiError(message, httpRequest, httpResponse): InferenceClientHubApiError
Параметры
| Имя | Тип |
|---|---|
message | string |
httpRequest | HttpRequest |
httpResponse | HttpResponse |
Возвращает
Переопределения
InferenceClientHttpRequestError.constructor
Определено в
Свойства
причина
• 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
Определено в
httpResponse
• httpResponse: HttpResponse
Наследуется от
InferenceClientHttpRequestError.httpResponse
Определено в
сообщение
• 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
Параметры
| Имя | Тип |
|---|---|
err | Error |
stackTraces | CallSite[] |
Возвращает
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 на целевом объекте
Параметры
| Имя | Тип |
|---|---|
targetObject | object |
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