Skip to main content

TimeoutError

  • When a request takes longer than the timeout, a TimeoutError is thrown.

TimeoutError object will have following property.

name​

  • The name of the error. Always set to TimeoutError.

message​

  • A string representing the error message.

request​

  • The Request object representing the Http request that caused the error.

timeout​

  • The number of milliseconds after which the request timed out.

isHttpProTimeoutError​

  • isHttpProTimeoutError function is a type guard that checks if an error is an instance of the TimeoutError class.

Parameter​

error : the error to check​

Return value​

  • true if the error is an instance of the TimeoutError class, false otherwise.