# Detect a dropped connection

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/mvo7043698298340/

Guide: Communications

# Detect a dropped connection

Learn how to identify and handle errors caused by dropped connections during offline tax calculations.

Errors related to offline tax calculation can be complex when the connection has dropped. Errors are generated from different locations:

-   AFC
-   The operating system
-   Your software development suite

A dropped connection produces a different kind of error, for example, `AspNetCore` produces a `WinHttpException` when a connection is dropped using `HttpClient`. Your task is to identify how the operating system or programming language exposes a connection error. Once you’ve identified this error, your code must trap the exception, ensure that you can respond correctly, and prevent the exception from being exposed to the end user or calling system.

Set an appropriate timeout value for your needs within your application. We can’t tell you exactly what timeout value is best for you; but in our experience, interactive web applications tend to have a shorter timeout and desktop accounting programs tend to have a longer timeout.

Now that you’ve prepared for a timeout in your application, the next step is to retry your transaction.