Defining and Better words

There’s an example in point 3 of this point:

The exact behaviour you choose to do in the situation is dependent on what you’re using this module for. If this is critical you may display a message to the user to let them know the call failed, by returning false or perhaps the error message itself.

You might put something more descriptive in the output using warn or print to help you debug later. If the lack of response doesn’t affect gameplay then you might choose to do this and silently fail without saying anything to the user.

You might, in the case of the synonym, to prevent it breaking the game just return the same word that was originally given. Not ideal, but better than nothing at all, and it can be accompanied with a user friendly message.

The possibilities are endless and it’s your decision in terms of what this module is actually for in its wider context and how it fits into your game or system. Currently only you have the knowledge of the full context to be able to make that decision.