title: Scala Dispatch library: how to handle connection failure or timeout?
body: <p>I've been using the Databinder Dispatch library in a client for a simple REST-ish API. I know how to detect if I get an HTTP response with an error status:</p>
  
  <pre><code>Http x (request) {
      case (200, _, _, content) =&gt; successResult(content())
      case (404, _, _, _) =&gt; notFoundErrorResult
      case (_, _, _, _) =&gt; genericErrorResult
  }
  </code></pre>
  
  <p>But how can I distinguish an error response from a failure to get any response at all, because of an invalid domain or failure to connect? And is there any way to implement a timeout while still using synchronous semantics? If there's anything relevant in the API, I've missed it.</p>