neulab / explainaboard_web

MIT License
8 stars 2 forks source link

Missing system name results in opaque "InternalError" #453

Closed neubig closed 1 year ago

neubig commented 1 year ago

If a system is missing a name in the UI, it currently results in an opaque "internal error":

Screen Shot 2022-10-25 at 5 48 33 AM

This was very confusing to me, so it'd be good to fix ASAP. @PaulCCCCCCH, I'm not sure if this was actually caused by one of your commits, but could you take it nonetheless since it has to do with the UI component that you designed?

PaulCCCCCCH commented 1 year ago

Hi, I have created a PR that fixes this issue. The validator is now catching the error and blocking the user from submitting.

A little more info about the cause if anyone is interested: the array to store system names is undefined instead of [ ] before you change the input box, which breaks the validator. The user will have to modify the input box for the validator to work. Somehow I didn't cover this case when testing it manually. Sorry for that.