Skip to content

Commit a4b10cb

Browse files
committed
print stack trace on exception during syncRouting
1 parent 7b36369 commit a4b10cb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • src/main/kotlin/com/sakethh/linkora/presentation/routing/http

src/main/kotlin/com/sakethh/linkora/presentation/routing/http/SyncRouting.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ fun Application.syncRouting(syncRepo: SyncRepo) {
1717
try {
1818
call.respond(syncRepo.getTombstonesAfter(eventTimestamp))
1919
} catch (e: Exception) {
20+
e.printStackTrace()
2021
call.respond(e.message.toString())
2122
}
2223
}
@@ -26,6 +27,7 @@ fun Application.syncRouting(syncRepo: SyncRepo) {
2627
try {
2728
call.respond(syncRepo.getUpdatesAfter(eventTimestamp))
2829
} catch (e: Exception) {
30+
e.printStackTrace()
2931
call.respond(e.message.toString())
3032
}
3133
}
@@ -38,6 +40,7 @@ private suspend fun RoutingContext.getTimeStampFromParam(): Long? {
3840
this.call.parameters["eventTimestamp"]?.toLong()
3941
?: throw IllegalArgumentException("Expected a valid eventTimestamp value, but received null.")
4042
} catch (e: Exception) {
43+
e.printStackTrace()
4144
call.respond(message = e.message.toString(), status = HttpStatusCode.BadRequest)
4245
null
4346
}

0 commit comments

Comments
 (0)