Added error handling to post ranking route