as a ktor feature, what would be the correct way t...
# ktor
j
as a ktor feature, what would be the correct way to add my own custom StatusPages for my specific exceptions? I have a feature that attaches it self to the routing feature, but I don't know how to attach to the StatusPages feature also without interfering with anything else that the user has set up for their own other stuff.
j
Hi @jeggy I’m using my own status pages in my backend. You can find some examples here: https://github.com/mathias21/KtorEasy/blob/master/src/Module.kt
j
I'm making my own Ktor Feature, so I need to modify the existing StatusPages or install it if it's not there already. Currently using the
featureOrNull
works perfectly with the Routing Feature, but this won't work for the StatusPages. I'm thinking maybe I should just use try/catch within my Feature, so I will catch it right away and not rely on ktor's statuspages implementation.