freeCodeCamp / chapter

A self-hosted event management tool for nonprofits
BSD 3-Clause "New" or "Revised" License
1.92k stars 359 forks source link

Calendar API error handling #2374

Open ojeytonwilliams opened 1 year ago

ojeytonwilliams commented 1 year ago

Discuss your ideas or share your views:

I was thinking a little more about the conversation I had with @gikf in https://github.com/freeCodeCamp/chapter/pull/2292#discussion_r1096794818 and the changes in https://github.com/freeCodeCamp/chapter/pull/2354

It seems there are three concerns, in rough order of importance

  1. Error handling, particularly rate limits https://github.com/freeCodeCamp/chapter/issues/2373
  2. Communicating to the user when they need to (re)authenticate and when the service is not available
  3. Avoiding useless requests to external APIs

1 and 2 are quite tightly coupled, since some errors will be caused by a lack of authentication.

3. can matter, since extra requests are wasteful and could push us over rate-limits. However, 1. and 2. seem crucial because otherwise the app could be broken and not give any sign to users.

With that in mind, it makes sense to set up the error handling + communication about those errors to the user first.

The key thing is that whatever we do needs to keep https://github.com/freeCodeCamp/chapter/issues/2373 in mind, since rate limits seem to be the most likely source of errors.

Sorry this is a little nebulous: I wanted to make sure the decision making happened publicly and I have not refined my thinking about this yet.

allella commented 1 year ago

Shared thoughts on https://github.com/freeCodeCamp/chapter/issues/2373#issuecomment-1429983784 that are mostly the same for this thread.