Uploaded image for project: 'ui-users'
  1. ui-users
  2. UIU-298

Error when adding an address with unrecognised country

    XMLWordPrintable

    Details

    • Template:
    • Analysis Estimate:
      None
    • Front End Estimate:
      Small < 3 days

      Description

      I ran into this when testing address maintenance in the factored-out-code-code version of ui-users in the UIU-278 branch.

      The problem is that if you just put "x" for the country, the code barfs when it goes to look that up in the line:

        const countryId = (addr.country) ? countriesByName[addr.country].alpha2 : '';
      

      But because stripes-form is involved and it does something weird with exceptions, the error ("TypeError: Cannot read property 'alpha2' of undefined") just gets thrown away. (I eventually discovered it by tracing the code down into redux-form.)

      There's no point fixing this in the current master, so I'll do it on my UIU-278 branch and it'll get merged to master soon. But more worrying is the underlying exception-swallowing problem, which is what concealed this and made it a difficult rather than a trivial problem. I will file a separate issue on that.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                JohnC John Coburn
                Reporter:
                mike Mike Taylor
                Analysis Estimator:
                Cate Boerema Cate Boerema
                Back End Estimator:
                Jakub Skoczen Jakub Skoczen
                Front End Estimator:
                Jakub Skoczen Jakub Skoczen
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 4 hours
                    4h

                      TestRail: Runs

                        TestRail: Cases