Fix bug wherein entering a character not in the API breaks everything. N...

...ow, it appends an error message to DOM.