It seems that after doing a few trade-ups it breaks and returns an error.
Changing the “Merc” or “Rarity” of the trade up card or which cards are used doesn’t change anything, it will return the same error.
Restarting the game fixes it occasionally.
Screen cap of issue below