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 quotes_are_escaped() {
        var json =  ErrorResponse.asErrorJson("Message \" with \" embedded quotes.");
        assertEquals("{\"error\":\"Message \\\" with \\\" embedded quotes.\"}", json);
    }