https://kotlinlang.org logo
#ktor
Title
# ktor
c

christophsturm

12/10/2020, 4:32 PM
I think ktor is really lacking in error handling. for example if you send a json body with one misspelled field it just returns 500 without any useful information (i made a pr to fix this). or when you send a jwt token in a wrong format (“Bearer: <token>” instead of “Bearer <token>“) it logs 2 stacktraces with the error message “java.lang.IllegalArgumentException: invalid authScheme value: it should be token”
it really looks like only the happy-path is really tested. IMO any time a server returns internal server error inside the server code thats a bug. and when a error message is logged about a wrong header it must mention how the header should look.
h

hhariri

12/11/2020, 5:17 AM
Agree that error handling should be more descriptive. If you could log it please. We’ll see how it can be handled.
I’ve [logged](https://youtrack.jetbrains.com/issue/KTOR-1492) a general task to review all, but if you have specific places, please also log them.
4 Views