João Gabriel Zó
10/04/2022, 6:25 PMBadRequestException
from Ktor just gives me “Illegal Input” and doesn’t actually say whats wrong with the request. Is there a way to improve it?simon.vergauwen
10/04/2022, 6:34 PMcause
references the original exception from KotlinX Serialization, and that should give you more information.
https://github.com/ktorio/ktor/blob/d7d244cf9f1a8f91675a161b5b97f5ad9681c594/ktor-[…]/io/ktor/serialization/kotlinx/KotlinxSerializationConverter.ktsimon.vergauwen
10/04/2022, 6:36 PMJsonException
gets turned into BadRequest
🤔João Gabriel Zó
10/04/2022, 6:43 PMJoão Gabriel Zó
10/04/2022, 6:46 PMsimon.vergauwen
10/04/2022, 6:47 PMJson
, and combining it with Arrow to do validation.
This DSL makes it easy to work, and inspect raw JsonElement
. https://github.com/nomisRev/kotlinx-serialization-jsonpathsimon.vergauwen
10/04/2022, 6:48 PMsindrenm
01/07/2023, 10:40 PMLogging
plugin is essentially unable to display a proper deserialization error message.
https://youtrack.jetbrains.com/issue/KTOR-5421