You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a few areas of logic where we're ending up bypassing the validations and hitting the unique indexes on the db due to a race condition.
The way the logic works is:
Submit button is pressed
Model validation is checked against the db if there already exists a record
Model is committed to the db
When the user is able to mash the submit button multiple times two requests can make it past step 2 and reach step 3 in tandem. The second request fails because of the unique index so it's not too pressing but the second response is an error condition so the form for the user may mention that.
Should be a simple fix: after the form is submitted for any API action disable the submit button until a response from the server is returned. This prevents the user from entering this state.
Areas where we've noticed this happening:
Contacts API
Contests API
The text was updated successfully, but these errors were encountered:
We have a few areas of logic where we're ending up bypassing the validations and hitting the unique indexes on the db due to a race condition.
The way the logic works is:
When the user is able to mash the submit button multiple times two requests can make it past step 2 and reach step 3 in tandem. The second request fails because of the unique index so it's not too pressing but the second response is an error condition so the form for the user may mention that.
Should be a simple fix: after the form is submitted for any API action disable the submit button until a response from the server is returned. This prevents the user from entering this state.
Areas where we've noticed this happening:
The text was updated successfully, but these errors were encountered: