Skip to main content
Version: 2.x

API Reference > @next-core/brick-kit > handleHttpError

handleHttpError() function

处理 http 请求错误(使用 AntDesign 模态框弹出错误信息)。

Signature:

export declare function handleHttpError(
error: Error | HttpFetchError | HttpResponseError | HttpParseError
): ReturnType<ModalFunc>;

Parameters

ParameterTypeDescription
errorError | HttpFetchError | HttpResponseError | HttpParseError错误对象。

Returns:

ReturnType<ModalFunc>