Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/somefn/js/err.ts>isNetworkError

some functions for deno
Go to Latest
function isNetworkError
import { isNetworkError } from "https://deno.land/x/somefn@v0.17.3/js/err.ts";

判断一个错误是否是网络错误, 如果是网络错误, 一般可以重试

Parameters

err: Error

需要判断的错误, 需要继承 Error

Returns

boolean

返回是否是网络错误