Error handling for invalid goal name