Added thrown error in favorites code