Seriously this is gross... last warning.
I'm guessing the dragon ate him whole and during digestion the bones become trapped within the dragon's intestine. This most likely lead to a bowel rupture that would lead to excruciating pain and septic shock. Prior to a bowel rupture, there have been cases of where living organisms would have regurgitated their fecal material as it became further impacted with its stool.
The dragon's last moments was probably having a very high heart rate, fever, gasping for air, raid breathing, chills, and blood oozing out of its anal cavity.