Skip to content

Handle unhandled promise rejection in submitCode calls#8476

Merged
iHiD merged 1 commit into
mainfrom
fix/8453
Feb 9, 2026
Merged

Handle unhandled promise rejection in submitCode calls#8476
iHiD merged 1 commit into
mainfrom
fix/8453

Conversation

@iHiD
Copy link
Copy Markdown
Member

@iHiD iHiD commented Feb 9, 2026

Closes #8453

Summary

  • The submitCode function throws new Error('Failed to submit code') when the HTTP response is not OK, but all three call sites (JikiscriptExercisePage, CSSExercisePage, FrontendExercisePage) invoke it fire-and-forget without await or .catch(), causing unhandled promise rejections reported to Sentry
  • Added .catch() handlers to all three submitCode call sites since these submissions are intentionally fire-and-forget background saves — users already see test results from client-side execution

Test plan

  • yarn test passes (160/160 suites, 1550/1550 tests)
  • Verified all three call sites have .catch() handlers

🤖 Generated with Claude Code

The submitCode function throws when the HTTP response is not OK, but all
three call sites invoke it without await or .catch(), causing unhandled
promise rejections reported to Sentry. Add .catch() handlers since these
submissions are intentionally fire-and-forget background saves.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD requested a review from dem4ron as a code owner February 9, 2026 11:05
@iHiD iHiD merged commit b2eea99 into main Feb 9, 2026
41 checks passed
@iHiD iHiD deleted the fix/8453 branch February 9, 2026 12:25
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.

Error: Failed to submit code

1 participant