classifyNetworkError
このコンテンツはまだ日本語訳がありません。
classifyNetworkError(
error):NetworkCode
Defined in: packages/core/src/errors.ts:408
Classify a fetch error into a specific NetworkCode.
Parameters
Section titled “Parameters”Error
the caught fetch exception
Returns
Section titled “Returns”the classified network error code
Precondition
Section titled “Precondition”error is a caught fetch exception
Postcondition
Section titled “Postcondition”returns one of NETWORK_ABORT, NETWORK_TIMEOUT, NETWORK_DNS, NETWORK_CONNECTION
Idempotency
Section titled “Idempotency”same error always produces same code