casa icon indicating copy to clipboard operation
casa copied to clipboard

Fix email preview error on invalid ID

Open compwron opened this issue 4 years ago • 3 comments

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/

compwron avatar Nov 16 '21 03:11 compwron

@FireLemons Can you add details here?

compwron avatar Nov 16 '21 03:11 compwron

This issue has been inactive for 246 hours (10.25 days) and will be automatically unassigned after 114 more hours (4.75 days).

github-actions[bot] avatar Dec 07 '21 00:12 github-actions[bot]

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.

github-actions[bot] avatar Dec 12 '21 00:12 github-actions[bot]

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!

: )

elhalvers avatar Apr 09 '23 01:04 elhalvers

We have successfully duplicated the issue.

elhalvers avatar Apr 09 '23 01:04 elhalvers

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: @.***>

elhalvers avatar Apr 09 '23 23:04 elhalvers

@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.

JoshDevHub avatar Apr 12 '23 13:04 JoshDevHub

Show the developer that they've entered an invalid user id and don't throw errors for invalid ids.

FireLemons avatar Apr 12 '23 21:04 FireLemons