createHttpError

函数

创建一个 {@link HttpError}

签名

function createHttpError(message: string, config: RequestConfig, options?: { response?: HttpResponse; code?: string; cause?: unknown; } | undefined): HttpError<unknown>

参数

名称类型描述
messagestring—
configRequestConfig—
options可选{ response?: HttpResponse; code?: string; cause?: unknown; } | undefined—

返回值

HttpError<unknown>

源码

packages/http/src/core/types.ts:92