freeCodeCamp/chapter

Unsubscribing via email links can fail with an unhelpful message

Closed this issue · 1 comments

When a new event is created, Chapter emails the subscribers to let them know about it. These emails contain two unsubscribe links; one for the chapter (to stop these kinds of emails) and one for the event (to stop notifications about that event specifically). However, until the user RSVPs the event unsubscribe link is both unnecessary and buggy. The user is shown "Error: No event_users found" and nothing happens.

We should

  • Only send links for things the user has subscribed to (in this case the Chapter that the event belongs to)
  • Handle the case where a unsubscribes more than once (e.g. by following the link twice or unsubscribing via the chapter/event page and then following the link)
gikf commented

I believe second task is already covered. Both using the link more than once, or doing it after unsubscribing on the page.

Additionally I think it might be worth to decide on some specific way of handling the Error: No event_users found error. Maybe just catch the error and follow the rest of happy patch? Technically the Unsubscribed information would be true.