Return a consistent error response which takes into account the chosen content type. Also adds tests for V1 server glue.