Skip to content

Fix submit errors in recruitment form - #587

Merged
ShreyashSri merged 2 commits into
pointblank-club:stagingfrom
DuttaNeel07:fix-submit
Nov 2, 2026
Merged

ShreyashSri merged 2 commits into
pointblank-club:stagingfrom
DuttaNeel07:fix-submit

Conversation

@DuttaNeel07

@DuttaNeel07 DuttaNeel07 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary: What does this PR do?

Fixes an issue where submitting the recruitment form showed an error to the user even though their data was saved in the database.

Bugs:

  1. when user clicks twice on submit it sent two requests and the later gives an error about already existing data
  2. if posthog crashed somehow it sent an error even if db operation was sucessful
  3. Timeout of 10s on mongoDb save, it was using promise.race() with a timeout of 10s so a sucessfull db save after 10s showed error eventually

Changes Made:

  1. set is submitting false into a finally block so it fires only after sucessful db save
  2. Wrapped posthog in a try catch block so any error regarding that doesn't show any error in user submit
  3. removed promise.race() 10s timeout for db save

Which issue(s) this PR fixes:

Fixes recruitment form showing error while data is saved to the database.

Changes Made

Describe the changes you've made in this PR:

  • Feature implementation
  • Bug fix
  • Documentation update
  • Code refactoring
  • Configuration changes
  • Other (please specify)

Type of Change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update
  • Performance improvement
  • Code cleanup or refactor

How Has This Been Tested?

Describe the tests you ran:

  • Unit tests
  • Integration tests
  • Manual tests
  • Other (please specify)

Please describe the test cases and expected behavior:

Screenshots (if applicable)

Dependencies

Documentation

  • I have updated the documentation accordingly
  • Documentation update is not required

Comments:

Reviewer Notes

@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

@DuttaNeel07 is attempting to deploy a commit to the yash's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ShreyashSri
ShreyashSri merged commit 209d355 into pointblank-club:staging Nov 2, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants