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

Error Handling: Handle google sheet errors so the app won't crash #30

Closed
Alex-Cannon opened this issue Aug 26, 2019 · 5 comments · Fixed by #46
Closed

Error Handling: Handle google sheet errors so the app won't crash #30

Alex-Cannon opened this issue Aug 26, 2019 · 5 comments · Fixed by #46
Assignees
Labels

Comments

@Alex-Cannon
Copy link
Collaborator

Alex-Cannon commented Aug 26, 2019

Our goal is to handle google sheet errors instead of the app crashing. Currently, if data is not formatted correctly, we have potential for 0 categories to work!

There are a decent amount of changes we need to make for this to work properly. I listed them below:

  1. Create category validation utils Error handling: Extract and test sheet validation logic #52
  2. Handle errors globally Error Handling: setup error handling across the app #51
  3. Create base error page Error Handling: Create base Error page #53
@airandfingers
Copy link
Contributor

I could look at this, but I'd probably need access to the spreadsheet, and it'd help to have examples of the kinds of errors that have occurred in the past.

@Alex-Cannon
Copy link
Collaborator Author

@airandfingers I'll send you a link on slack.

The spreadsheet repeats titles of categories, non-profits, tags, etc. Issues can occur when these variables don't match up between the different pages of the sheet.

For example, I had an issue, where the pet-health category was defined on the "root" sheet (which we reference in the other sheets) was misspelled in another page. This broke displaying categories on the home page.

I think the best way for you to reproduce some of these errors is to...

  1. Create your own google spreadsheet & api key. Copy our data over (our api key is read-only)
  2. Try misspelling categories, titles, etc.
  3. See if there are errors

Basically, if there is a category / other data inputed incorrectly that breaks the app, we should catch those errors and handle them. Ideally, we have some error message on the app that says something along the lines of "Category XYZ had invalid data. Please contact your site administrator."

I imagine this happening by creating a "checkCategoryValid" function in the helpers.js file. We also want to have some tests for this.

@airandfingers
Copy link
Contributor

FYI I've started the fix at airandfingers#1, but it has plenty more changes/tests to add before it's ready to merge.

In the meantime, if you like I could create a PR to this repo's master instead, maybe tagging it with something like "in progress" or "not ready for review".. I've found this to be useful at work if I ever need help/feedback while still developing functionality.

@Alex-Cannon
Copy link
Collaborator Author

Alex-Cannon commented Oct 12, 2019 via email

@Alex-Cannon Alex-Cannon changed the title UX: Handle google sheet user-errors so the app doesn't crash Add functions to handle google sheet errors in /utils Oct 28, 2019
@Alex-Cannon Alex-Cannon changed the title Add functions to handle google sheet errors in /utils Handle google sheet errors so the app won't crash Oct 28, 2019
@Alex-Cannon Alex-Cannon changed the title Handle google sheet errors so the app won't crash Error Handling: Handle google sheet errors so the app won't crash Oct 28, 2019
@Alex-Cannon
Copy link
Collaborator Author

I made this issue a milestone, so I'm closing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants