Sub hc_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Log("Error")
Log(StatusCode)
If Floor(StatusCode / 100) = 3 Then '3xx status
If response <> Null Then
Log("Redirect to: " & response.GetHeaders.Get("Location"))
End If
End If
End Sub