ktorio / ktorio/ktor

How to ignore all exceptions and keep running at all costs?

Open
#1,497 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
14.5k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
49

Description

Even if some API or some third party service or whatever is bugging out, as a policy I would like the server to do it's best and keep doing whatever is working.

By default, when an exception occurs, it's game over, server down, everything stops working.

What is the recommended way to maybe just log ALL possible exceptions (even typically server life-threatening ones) and just stay alive as if nothing is wrong?

Of course, this would have to be coupled with monitoring, downtime alerts etc. but I think this is always preferable to having the server die.

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by locating Ktor's server exception handling and logging paths, then determine how failures from APIs and third-party services should be isolated without stopping unrelated work. Done should include a documented policy for which exceptions are caught, logged, and allowed to terminate the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
backend, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.