Error handling for invalid goal name
Error handling for invalid goal name in Python3