Skip to content

fix: convert throw sites in new components to SDKInternalError#1299

Merged
serikjensen merged 1 commit intomainfrom
SDK-509-internal-error-followup
Mar 19, 2026
Merged

fix: convert throw sites in new components to SDKInternalError#1299
serikjensen merged 1 commit intomainfrom
SDK-509-internal-error-followup

Conversation

@serikjensen
Copy link
Copy Markdown
Member

Summary

  • Converts throw new Error(...) to throw new SDKInternalError(...) in TransitionCreation and DismissalPayPeriodSelection components
  • These guard clauses are inside baseSubmitHandler callbacks and should surface as inline banners, not ErrorBoundary crashes
  • Follow-up to feat: introduce unified SDKError type and ObservabilityError extension #1286 which introduced SDKInternalError — these components were merged to main concurrently

Changed files

  • src/components/Payroll/TransitionCreation/TransitionCreation.tsx — missing payroll ID guard
  • src/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.tsx — no period selected, invalid period, missing payroll ID guards

Test plan

  • TypeScript compilation passes (npx tsc --noEmit)
  • Full build succeeds (npm run build)
  • No lint errors
  • sdkError.test.ts — 14 tests passing

Made with Cursor

…Selection to SDKInternalError

Guard clauses inside baseSubmitHandler callbacks should use
SDKInternalError so they surface as inline banners instead of
crashing the component via ErrorBoundary.

Made-with: Cursor
@serikjensen serikjensen merged commit 1f448e6 into main Mar 19, 2026
17 checks passed
@serikjensen serikjensen deleted the SDK-509-internal-error-followup branch March 19, 2026 22:49
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