cds-snc/notification-planning

500 error in notification-admin when visiting `/contact?current_step=message` directly [bug-bogue]

Closed this issue · 9 comments

Describe the bug

We got a 500 error in notification-admin when someone visited /contact?current_step=message when they were missing some data from their session from the previous step.

Bug Severity

See examples in the documentation

SEV-3 Minor

To Reproduce

Steps to reproduce the behaviour:

  1. open incognito window and visit https://staging.notification.cdssandbox.xyz/contact
  2. Fill in name and email
  3. paste in the following url and hit enter: https://staging.notification.cdssandbox.xyz/contact?current_step=message

Steps 1 and 2 may not be necessary

Expected behaviour

Either an error message or the user should be redirected to the 1st step again.

Impact

Impact on Notify users: This is an edge case but it is not a great UX

Impact on Notify team: Alarm noise

Additional context

We have been getting 500 errors around the contact page for quite a while.

I put up a draft PR for this, the work is mostly done. Tests need to be written and manual testing done to ensure no regressions have been introduced.

The code for this is complete and now ready for review!

Andrew and/or maybe a core team member to review.

@smcmurtry to review.

Approved, looks great! This comment describes the testing I performed: cds-snc/notification-admin#1633 (review)

some observations from QA in Staging
When I ran test 2, and I navigated to /contact/organization-details I was not returned to the /contact page but rather brought to the Set up a demo page

Private Zenhub Image

All other tests passed as expected when I did them