Narrows an unknown caught value to HttpError — the replacement for axios's isAxiosError.
isAxiosError
the value from a catch block.
catch
true when the value is an HttpError, narrowing its type for the caller.
catch (error) { if (IsHttpError(error) && error.Status === 403) { ... } throw error; // anything else is not ours to interpret} Copy
catch (error) { if (IsHttpError(error) && error.Status === 403) { ... } throw error; // anything else is not ours to interpret}
Narrows an unknown caught value to HttpError — the replacement for axios's
isAxiosError.