Hey I'm using the `RequestValidation` plugin and I...
# ktor
a
Hey I'm using the
RequestValidation
plugin and I was curious if there was any way to either extend
ValidationResult.Invalid
to include a Throwable, or a way to pass a throwable to
StatusPages
using
ValidationResult
. Currently I am just throwing an error in the
install(RequestValidation) {}
block and always returning
ValidationResult.Valid
but that feels like a gross workaround
It looks like I can also hijack the
reason
String on the
ValidationResult.Invalid
object and inject a json string and then pull it out on the other side, but that is just as equally as gross as my initial solution 😬