Added error handling to Profile service