learning-unlimited / ESP-Website

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

Not a student error shouldn't say whoops #819

Open benjaminjkraft opened 10 years ago

benjaminjkraft commented 10 years ago

The "not a student/teacher" error says "Whoops! – An error has occurred!" which makes the user think it's our fault, when in fact it is not. This is confusing; the error should look more like the deadline error page.

benjaminjkraft commented 10 years ago

This appears to be lottery_student_reg, lottery_student_reg_simple, and lsr_submit, all in esp.program.views. They are manually checking student status and then raising an ESPError with some message if not, rather than using @needs_student. Is there a reason not to just make them @needs_student instead so the right error gets raised?