Skip to content

feat: add available states to error

My general workflow for adding meets (when I get the chance) is to use the online checker for the first phase (getting it mostly complete) and then to swap to running checker locally so I get error messages across the whole database (for disambiguations).

One of the more annoying errors I find myself running into is the "unknown state" message, as I can never remember what the options are (is it South Midlands, SM, Oxfordshire, England, who knows). It would be nice to display the values in the error message.

This change:

  • Derives EnumIter on some country states so we can iterate over them
  • Adds a get_available_for_country function on State to get the available options if there are any
  • Adds a questionably generic function inside that to do the iteration and mapping
  • Uses the output in the error message when checking meet states

Screenshot_2023-02-06_at_20.44.54

Edited by Alexander Jackson

Merge request reports