Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim client As New GOSocketClient(oHeaderConfig)
- With (client)
- oResponseApi = .PostRestClient(Of DocumentToAuthority, ProcessResult)(sUrl, oRequestBody)
- End With
- If Not IsNothing(oResponseApi.ResponseException) Then
- Select Case True
- Case TypeOf oResponseApi.ResponseException Is WebException
- If CType(oResponseApi.ResponseException, WebException).Status = WebExceptionStatus.ConnectFailure Then
- Throw New UserException("FACTURACION ELECTRONICA NO DISPONIBLE." & vbCrLf & "REGISTRE DOCUMENTO EN CONTINGENCIA")
- ElseIf CType(oResponseApi.ResponseException, WebException).Status = WebExceptionStatus.Timeout Then
- Throw New TimeoutException("ENVIO DE DOCUMENTO DEMORO MAS DE LO ESPERADO, INTENTE NUEVAMENTE.")
- Else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement