- Type:
System.Net.Http.HttpRequestException - Message:
No connection could be made because the target machine actively refused it. - HRESULT:
0x80004005 - Inner Exception:
- Type:
System.Net.Sockets.SocketException - Message: Ditto
- Error code:
10061(WSAECONNREFUSED)
- Type:
- Notes: Likely firewall caused, can be invoked by making a request to a host on a port that's not open or active
- Type:
System.Net.Http.HttpRequestException - Message:
The requested name is valid, but no data of the requested type was found. - HRESULT:
0x80004005 - Inner Exception:
- Type:
System.Net.Sockets.SocketException - Message: Ditto
- Error code:
11004(WSANO_DATA)
- Type:
- Notes: Can be invoked if the domain in question is configured in hosts to point to 0.0.0.0
- Type:
System.Net.Http.HttpRequestException - Message:
Response status code does not indicate success. - HRESULT:
0x80131500 - Inner Exception:
null - Notes: Invoked when
HttpResponseMessage.EnsureSuccessStatusCode()is called on an errored response
- Type:
System.Threading.Tasks.TaskCanceledException - Message:
A task was canceled. - HRESULT:
0x8013153B - Inner Exception:
null - Notes: Happens when the time spent waiting for a response exceeds the defined HttpClient timeout period. Can be simulated if you set the timeout to 1 millisecond or something. Will likely be the most common error you face in production as a firewall or poor connection will typically cause this.