Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better reporting of unexpected errors from the importer #1934

Open
niklasva82 opened this issue Apr 26, 2024 · 2 comments · May be fixed by #1957
Open

Better reporting of unexpected errors from the importer #1934

niklasva82 opened this issue Apr 26, 2024 · 2 comments · May be fixed by #1957
Assignees
Labels
🐜 bug Something isn't working 🐟 Small Should be a quick-ish fix.

Comments

@niklasva82
Copy link
Member

niklasva82 commented Apr 26, 2024

See the comments below.

Description

When trying to import a file that was exported from another Zetkin organization and after resolving errors related to e.g. phone formatting, I clicked the Validate button and expected to see the validation screen. Instead however nothing happened and the console log printed the INVALID_COUNTRY error.

Steps to reproduce

  1. Go to import for organization 978
  2. Use the file provided (I will upload it on Slack, it contains some real people as well, search for the issue #)
  3. Choose the appropriate fields for all the fields.
  4. Click validate

Expected Behaviour

Any potential errors should be visible or it should say everything is fine and it should give me the option to proceed with the import.

Actual Behaviour

Nothing happens in the UI. Instead INVALID_COUNTRY is printed. This is also printed if Country is not imported.

Screenshots (if you have any)

Other information

This appears to be a frontend validation issue, because no upload of the data to /preview was triggered.

@niklasva82 niklasva82 added 🐜 bug Something isn't working 💣 critical Bugs that are need to be solved asap labels Apr 26, 2024
@niklasva82
Copy link
Member Author

niklasva82 commented Apr 26, 2024

This was related to the parsing of phone numbers when the country of the organization is invalid. It needs to be an upper-case ISO country code. In this case it was se and should have been SE.

@niklasva82
Copy link
Member Author

A better way of reporting errors coming from the importer would be nice. When it encounters an unknown error rather than not doing anything, it would be good if it instead showed an error including some relevant information.

It could simply catch the error and print it in a simple text box which can be copied and sent to us for further diagnosis.

@niklasva82 niklasva82 added 🐟 Small Should be a quick-ish fix. and removed 💣 critical Bugs that are need to be solved asap labels Apr 26, 2024
@niklasva82 niklasva82 changed the title Import of seemingly valid data results in INVALID_COUNTRY Better reporting of unexpected errors from the importer Apr 26, 2024
@rebecarubio rebecarubio self-assigned this May 7, 2024
@rebecarubio rebecarubio linked a pull request May 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐜 bug Something isn't working 🐟 Small Should be a quick-ish fix.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants