Some errors (validation) have structured contents, not just an error string, so we return them JSON-encoded along with a HTTP error 400.