I was feeding my D.grantii the other night and one of them had it's head at the surface when I opened the tub. I looked at it and a black liquid started being up from it's mouth. Is this a deterrent? Kinda freaked me out tbh
Adult Dynastes do it as well. Regurgitating liquified gut contents when disturbed is also a well known behavior in many Orthoptera, especially short-horned grasshoppers (Acrididae). Presumably, the fluid is foul-tasting to predators.