Gustavo Cesário
08/07/2025, 1:57 AMpost("/payments") {
try {
val request = call.receive<PaymentRequest>()
QueueService.addPaymentRequestToQueue(request)
call.respond(HttpStatusCode.Accepted)
} catch (e: Exception) {
call.respond(HttpStatusCode.InternalServerError, "Error processing payment request: ${e.message}")
}
}
• I already tried to wrap QueueService.addPaymentRequestToQueue in launch {}
.
• There are other coroutines running at the same time in my application.
I'm new to coroutines and ktor, so I'm afraid that I might have messed something with the dispatchers and how I'm creating the coroutines. What could I do to investigate what the problem is?Aleksei Tirman [JB]
08/07/2025, 8:47 AMCLOVIS
08/08/2025, 10:05 AMCLOVIS
08/08/2025, 10:08 AMGustavo Cesário
08/08/2025, 9:03 PMGustavo Cesário
08/08/2025, 9:04 PM