Fix email preview error on invalid ID
Email previews can be passed a user id as a get parameter id=. If the id doesn't exist or is the wrong type of user for the email, don't throw an unhandled error, instead show an error explaining why the id parameter is bad.
see https://casa-qa.herokuapp.com/rails/mailers
see lib/mailers/previews/
@FireLemons Can you add details here?
This issue has been inactive for 246 hours (10.25 days) and will be automatically unassigned after 114 more hours (4.75 days).
This issue has been inactive for 366 hours (15.25 days) and is past the limit of 360 hours (15.00 days) so is being unassigned.
Hey @joshdevhub and I can work on this.
Hey @FireLemons is there a reason that this was removed from the To do in CASA Volunteer Portal last week?
Thanks!
: )
We have successfully duplicated the issue.
Thanks Shen!: )EricOn Apr 9, 2023, at 15:08, Shen Yang @.***> wrote: Assigned #2959 to @elhalvers.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were assigned.Message ID: @.***>
@FireLemons @compwron
I'm working on this with @elhalvers and had a question about the exact requirements. Do you specifically want better error reporting on the QA site? Like if I visit https://casa-qa.herokuapp.com/rails/mailers/casa_admin_mailer/account_setup?id=11111, you'd like something about that user id not existing rather than a generic 500 page?
Or would you be okay with more precise errors just being reported in the development environment and logs?
Edit: Feel free to disregard. Got necessary info on Slack.
Show the developer that they've entered an invalid user id and don't throw errors for invalid ids.