Skip to content

seatConfirmationSent field not written when API request times out #79

@izruff

Description

@izruff

When the API request to send a seat confirmation email fails while awaiting confirmation on the /ticket/select page, the seatConfirmationSent field on the ticket's Firestore document should be set to false.

However, when the API request times out (which could potentially happen when the number of seats in the ticket is >40), this seatConfirmationSent field does not get set, and it stays non-existent.

Most of our scripts implicitly assume that fields that we check always exist. One of the reasons for this design is that Firestore automatically filters out documents that does not contain a specific field in most (if not all) "where" queries or other queries alike.

Therefore, we need to make sure seatConfirmationSent should always exist when seatConfirmed is set to true. In this case, we need to set seatConfirmed = true and seatConfirmationSent = false simultaneously (e.g. using a transaction).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions