Skip to content

Record why a cool-tech-jobs submission failed - #20986

Merged
smallbrownbike merged 2 commits into
PostHog:masterfrom
tsayin4:fix/20955-cool-tech-jobs-submit-visibility
Nov 2, 2026
Merged

smallbrownbike merged 2 commits into
PostHog:masterfrom
tsayin4:fix/20955-cool-tech-jobs-submit-visibility

Conversation

@tsayin4

@tsayin4 tsayin4 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #20955

A company reported it could not submit the form on /cool-tech-jobs, and there was nothing left behind to look at. Three reasons, all in the same handler:

  • A missing profile id or JWT returned silently. if (!profileID || !jwt) return stopped the submit with no message, so an expired session looked exactly like a broken page.
  • Four different failures shared one catch and one message — create, logo upload, attach logos, scrape jobs — with no record of which one happened.
  • That catch logged nothing and sent no event. A failure left no trace at all, which is why the report could not be acted on.

This tracks step as the handler moves through it, puts the step and the HTTP status into the thrown error, and on failure writes a console.error and captures cool_tech_jobs_submit_failed with the step. The expired-session case now says so, and tells the person their input is still there.

The message a user sees for a genuine failure is unchanged — this only adds what happens behind it.

cool_tech_jobs_submit_failed { step: 'create_company', message: 'create_company: 403 Forbidden' }
cool_tech_jobs_submit_failed { step: 'auth', reason: 'missing_jwt' }

I used usePostHog() and posthog?.capture(...), which is what IssueForm in this same file already does.

What I could not verify: I did not run the full site build, so this is checked by reading rather than by loading the page. npx prettier@2 --write on the file produces no changes, matching the version in package.json. If you would rather the event name or the property shape followed a different convention, say which and I will change it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AqD13QkB8DhzkDSdKbJScv

@github-actions github-actions Bot added the website About the website (beyond just landing pages) label Oct 8, 2026
A company reported it could not submit the form, and there was nothing to look at
afterwards. Three reasons, all in the same handler:

- A missing profile id or JWT returned silently. The button stopped and the form
  said nothing, so an expired session looked identical to a broken page.
- Four different failures - create, logo upload, attach, scrape - shared one catch
  and one message, with no record of which one happened.
- That catch logged nothing and sent no event, so a failure left no trace at all.

This tracks the step as the handler moves through it, puts the step and the HTTP
status into the thrown error, and on failure writes a console error and captures
cool_tech_jobs_submit_failed with the step. The expired-session case now says so
and tells the user their input is still there.

The message the user sees for a genuine failure is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01AqD13QkB8DhzkDSdKbJScv
@tsayin4
tsayin4 force-pushed the fix/20955-cool-tech-jobs-submit-visibility branch from 620182c to d37a79e Compare October 9, 2026 14:14
@charlescook-ph charlescook-ph moved this from Backlog to In Progress in PostHog.com planning Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR hasn't seen activity in two weeks! Should it be merged, closed, or further worked on? If you want to keep it open, please remove the stale label – otherwise this will be closed in another week. If you want to permanently keep it open, use the waiting label.

@github-actions github-actions Bot added the stale This pull request has been marked as stale and will be closed soon automatically label Oct 26, 2026
@andyvan-ph andyvan-ph moved this from In Progress to Awaiting review in PostHog.com planning Nov 2, 2026

@smallbrownbike smallbrownbike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice thank you!!

@smallbrownbike
smallbrownbike enabled auto-merge (squash) November 2, 2026 16:17
@smallbrownbike
smallbrownbike merged commit fa02c85 into PostHog:master Nov 2, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This pull request has been marked as stale and will be closed soon automatically website About the website (beyond just landing pages)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: cool tech jobs application form fails with no error data and returns silently without a session

3 participants