title: Ktor seems to be swallowing exceptions
body: <p>I am using Ktor with kotlin multiplatform and I am trying to figure out why I am not getting any exceptions that get thrown. In my client configuration I am using the <code>HttpResonseValidator</code> to check the status code coming back</p>
  
  <pre><code>private val client = HttpClient(clientEngine) {
          install(JsonFeature) {
              serializer = KotlinxSerializer(Json.nonstrict)
          }
  //        addDefaultResponseValidation()
          HttpResponseValidator{
  
              validateResponse { response: HttpResponse -&gt;
                  val statusCode = response.status.value
                  when (statusCode) {
                      in 300..399 -&gt; throw RedirectResponseException(response)
                      in 400..499 -&gt; throw ClientRequestException(response)
                      in 500..599 -&gt; throw ServerResponseException(response)
                  }
  
                  if (statusCode &gt;= 600) {
                      throw ResponseException(response)
                  }
              }
  
              handleResponseException { cause: Throwable -&gt;
                  throw cause
              }
          }
      }
  </code></pre>
  
  <p>I am returning http status code <code>401</code> error on my server for testing so I should see my code throw a <code>ClientRequestException</code> and the <code>validateResponse</code> does get called but I never see any exceptions in the console and my app just stops without any indication anything happened.</p>
  
  <p>this is my call</p>
  
  <pre><code>private suspend fun getDataForUrl(url:String, callback: (MyObject?) -&gt; Unit){
      val response = client.get&lt;MyObject&gt;(url)
      callback(response)
  }
  </code></pre>
  
  <p>Which is called via</p>
  
  <pre><code>fun getData(callback: (MyObject?) -&gt; Unit){
      launch(dispatcher()){
          getDataForUrl("$BASE_URL", callback)
      }
  }
  </code></pre>
  
  <p>When I surround the call with a try/catch</p>
  
  <pre><code>try{
      val response = client.get&lt;MyObject&gt;(url)
  catch(e:Exception){
  }
  </code></pre>
  
  <p>I do get the exception but I dont really like that its getting caught here and not in the upper levels of my code.</p>
  
  <p>Why is it getting swallowed up when there isn't a try/catch around it?</p>