What’s the standard way to return a 400 response w...
# ktor
s
What’s the standard way to return a 400 response when there is an error deserializing Json? Wrapping each body deserialization with a try/catch, looking for
kotlinx.serialization.json.JsonParsingException
, or using an equivalent extension function seems error prone and verbose. Surely there is a way to do this at the feature level?
z
the StatusPages feature centralizes error handling
s
that works, thanks