private List<ErrorMessage> flattenErrors(Response processingResponse) {
        Set<ErrorMessage> errors = flattenErrors(null, processingResponse.data());
        if (errors == null) return List.of();
        return List.copyOf(errors);
    }
This sets header and status from special Data items used for the purpose.
Do both at once to avoid traversing the data tree twice.
container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java