Return data structures on errors

This allows us to send back valid JSON and EDN when we get a schema validation error. There are possibly other errors it could be applied to as well.