Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TimeoutError

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
  }
})

Hierarchy

Index

Constructors

Properties

Constructors

constructor

Properties

message

message: string

name

name: string

Optional stack

stack: undefined | string

Static Error

Error: ErrorConstructor