I’m not sure how to answer your post, to be honest. Maybe you can share more context so that our community can help you more.
For me, here’s my thoughts about what you’ve shared.
It seems like there is an issue with the code snippet provided after the reduce operator. The problem is that the reduce operator returns a single value of type [Request] , but the following map operator is expecting a publisher of type [Request]?.
To fix this issue, you can change the return type of the reduce operator to AnyPublisher<[Request], Never> and then use the eraseToAnyPublisher() method to convert it to AnyPublisher<[Request]?, Never> before using the map operator.
By doing this, the output of reduce will be converted to AnyPublisher and will have the same output as expected by the next operator(map) .
It’s also a good practice to check if the output of the reduce function is as expected, for example by adding a sink or a print statement to debug the output.