Looking at the flow I there are actually two items. Assume that one probably has binary data and another does not. And it then fails for the one that does not. So what you probably want to do is:
Change the code in the Code-Node to combine both items to have one single time that contains data + binary data
or
Change the Merge-Node and to not use “Mode: append” (as that means that there are 2 items) and rather choose: “Mode: Combine” and “Combination Mode: Merge By Position”