With a little more lua experience I figured out what it is.
error("KenirasRandomRecipes: unexpected nil variable")
You're using the error function, and for whatever reason, transfer_distance isn't a value in my robots (don't know if it was removed or whatever).
If it is changed to log, it won't cause an error, or if you figure out if the variable was renamed, then it'd work.
Edit: I'm running Data Raw Serpent (my own modding) and transfer_distance doesn't exist anywhere