title: Error java.lang.illegalstateexception request == null
body: <p>Can someone tell me what could be the mistake? 
  For some time it worked fine. And now, it appears, then disappears. The error appears when I start to enter the address in the autocomplete
  I will be very grateful!!</p>
  
  <p>When starting up, the following error appears on the device</p>
  
  <pre><code>java.lang.IllegalStateException: request == null
   at okhttp3.Response$Builder.build(Response.java:442)
   at com.sheepapps.domras.data.autocomplete.AutocompleteService$client$1.intercept(AutocompleteService.kt:19)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
   at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:250)
   at okhttp3.RealCall$AsyncCall.execute(RealCall.java:201)
   at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
   at java.lang.Thread.run(Thread.java:764)
  </code></pre>
  
  <p>Below the application code itself</p>
  
  <pre><code>package com.sheepapps.domras.data.autocomplete
  
  import androidx.core.text.isDigitsOnly
  import com.jakewharton.retrofit2.adapter.kotlin.coroutines.CoroutineCallAdapterFactory
  import okhttp3.OkHttpClient
  import okhttp3.Response
  import retrofit2.Retrofit
  import retrofit2.converter.gson.GsonConverterFactory
  import kotlin.math.pow
  
  class AutocompleteService {
  
      private val client = OkHttpClient.Builder()
          .addInterceptor {
              try {
                  it.proceed(it.request())
              } catch (e: Exception) {
                  e.printStackTrace()
                  Response.Builder().code(500).build()
              }
          }.build()
  
      private val service = Retrofit.Builder()
          .baseUrl("https://nominatim.openstreetmap.org/")
          .addConverterFactory(GsonConverterFactory.create())
          .addCallAdapterFactory(CoroutineCallAdapterFactory.invoke())
          .client(client)
          .build()
          .create(AutocompleteAPI::class.java)
  
      suspend fun search(query: String, lon: Double, lat: Double) =
          service.search(query, "json", "1", "1", 50, "by")
              .apply {
                  if (query.split(" ").any { it.isDigitsOnly() }) {
                      sortBy { it.address?.houseNumber ?: "0" }
                  } else {
                      sortBy {
                          (it.lon?.toDouble() ?: 0.0 - lon).pow(2) + (it.lat?.toDouble() ?: 0.0
                          - lat).pow(2)
                      }
                  }
              }
              .filter { it.address?.road != null }
              .map { it.convert() }
  }
  </code></pre>