In this case the issue is on Cursed Filter Mining Drill's side.
As far as I can tell, when drawing the sprite that you see on top of the mining drill after you select a filter, Cursed Filter Mining Drill assumes that the name of the resourceEntity is the same as the item without checking if this is actually the case.
For example, when mining the resourceEntity "iron-ore", you get the item "iron-ore".
For vanilla, it works perfectly fine. However, in the case of modded resources, this can cause issues.
For example, I tried Cursed Filter Mining Drill + Angel's Infinite Ores without my mod and when selecting an infinite ore I got the same error:
It should be the same for a lot of mods that add new resources.
The code that is causing this error is in control.lua. I don't think I can modify that from my side.
EDIT: I created a report on Cursed Filter Mining Drill's mod portal.