static String asErrorJson(String message) {
        try {
            return Jackson.mapper().writeValueAsString(Map.of("error", message));
        } catch (JsonProcessingException e) {
            log.log(WARNING, "Could not encode error message to json:", e);
            return "Could not encode error message to json, check the log for details.";
        }
    }
@Test
    void error_message_is_wrapped_in_json_object() {
        var json =  ErrorResponse.asErrorJson("bad");
        assertEquals("{\"error\":\"bad\"}", json);
    }