This error will be thrown when the fetch API timesout, this will help checking whether the error by the fetch API were caused by a timeout. Timeouts of the fetch API are a custom implementation and therefor we throw custom errors.
const [action, promise] = reducerName.createFetchAction(); store.dispatch(action); // Request timesout promise.catch( error => { if ( error instanceof TimeoutError ) { // handle time out here } })
This error will be thrown when the fetch API timesout, this will help checking whether the error by the fetch API were caused by a timeout. Timeouts of the fetch API are a custom implementation and therefor we throw custom errors.
Example
const [action, promise] = reducerName.createFetchAction(); store.dispatch(action); // Request timesout promise.catch( error => { if ( error instanceof TimeoutError ) { // handle time out here } })