learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
82 stars 57 forks source link

"You seem to be trying to email 0 people" should show to the user and not throw an exception in the logs #3579

Closed hwatheod closed 7 months ago

hwatheod commented 1 year ago

In esp/esp/program/modules/handlers/commmodule.py line 100-106, if the user filter list selected produces 0 users, we raise an ESPError with a message "You seem to be trying to email 0 people", which causes an exception to be logged. I don't know if the user even sees this error message. But this is a user error, not an exception, and the error message should just be shown to the user.

alexh555 commented 7 months ago

Tested as user, error message works as intended.