public static FetchSnapshotResponseData withTopLevelError(Errors error) {
        return new FetchSnapshotResponseData().setErrorCode(error.code());
    }
Creates a FetchSnapshotResponseData with a top level error.

@param error the top level error
@return the created fetch snapshot response data
clients/src/main/java/org/apache/kafka/common/requests/FetchSnapshotResponse.java