Exception in thread "main" java.io.EOFException: Failed to parse HTTP response: unexpected EOF
at io.ktor.client.engine.cio.UtilsKt$readResponse$2.invokeSuspend(utils.kt:162)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
I think the repository should return an HTTP code indicating the error but not crash in this scenario.
I have Postgres running on Docker and I often forget to start it. When it happens the server logs this:
On the client side I see this:
I think the repository should return an HTTP code indicating the error but not crash in this scenario.