yes, you did the right thing by putting him down.

next time make sure you're not holding the snake when he's near the prey item, lol. thats also an easy way to get bit.