Nordstrom / xrpc

Simple, production ready Java API server built on top of functional composition.
Apache License 2.0
17 stars 17 forks source link

Don't allow null response bodies to be serialized. #196

Closed jkinkead closed 6 years ago

jkinkead commented 6 years ago

This fixes a behavior change introduced in #194. There are response builder helpers that don't take a body, and should be used for an empty response body. A null body probably indicates a programming error.

Clean up a exception construction slightly, and add back in preconditions checks which were removed. This forces the user to provide an error message, which is what we want (information-free errors are not great).

jkinkead commented 6 years ago

Code updated!

andyday commented 6 years ago

👍 LGTM!