Sorry to hear this. Was she a young girl?
Sometimes they just pass for no good reason, nothing that could have been prevented. I am dearly attached to all of my animals and I'm lucky to have only had to deal with their deaths a few times. I know they are getting up there in age for breeders and I will have to start dealing with the passing of many of my oldest and most valued females and males since we did get most of them all at the same time.
I hope you find a new rattie that loves you, and you can love them just as much if not more than this last girl.