papsign / Ktor-OpenAPI-Generator

Ktor OpenAPI/Swagger 3 Generator
Apache License 2.0
241 stars 42 forks source link

NPE when missing required field on header #74

Closed inaiat closed 3 years ago

inaiat commented 3 years ago

Example:

http -v :8080/header 
GET /header HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: localhost:8080
User-Agent: HTTPie/2.2.0

HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Length: 0

Returns this exception on server: java.lang.reflect.InvocationTargetException: null

So, this exception is much generic to handler with throws DSL.

I think the one option is a specific exception for this case

Thank you.

Wicpar commented 3 years ago

released and fixed