Skip to main content

HttpProError

  • When Response.status is not between 200 and 299 or validateStatus function returns false, HttpProError will be thrown.

  • HttpProError object will have following property.

name​

  • the name of the error, always set to HttpProError.

message​

  • A string representing the error message.

response​

  • The Response object representing the Http response that caused the error.

request​

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

isHttpProError​

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

Parameter​

error : the error to check​

Return value​

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