Skip to content

Fix/preview invalid submission - #295

Merged
m-messer merged 2 commits into
mainfrom
fix/preview-invalid-submission
Oct 22, 2026
Merged

m-messer merged 2 commits into
mainfrom
fix/preview-invalid-submission

Conversation

@m-messer

Copy link
Copy Markdown
Member

Problem

Changes

Checklist

  • Tests added/updated
  • Docs updated (app/docs.md) if user-facing behaviour changed

Closes #

m-messer and others added 2 commits October 22, 2026 14:14
…st crash

Parse errors in student input were raised as plain Exceptions, so the
base layer returned HTTP 500 instead of 422 (Sentry CLIENT-BACKEND-FD).

- Add ParsingError(ValueError) for input that does not match the grammar
- Raise ValueError for Sympy/LaTeX parse failures in the physical quantity preview
- Pop the list returned by latex2sympy for comma separated input, which
  raised `'list' object has no attribute 'subs'`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The evaluation logging wrapper replaced every unexpected exception with
EvaluationError, so LaTeX responses that could not be parsed returned
HTTP 500 instead of 422 (Sentry CLIENT-BACKEND-HS).

Add ResponseParsingError(ValueError), raise it when the response LaTeX
cannot be parsed, and pass it on unchanged like TaskConfigurationError.
The message never contains the response.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m-messer
m-messer merged commit cece25e into main Oct 22, 2026
10 checks passed
@m-messer
m-messer deleted the fix/preview-invalid-submission branch October 22, 2026 14:18
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.

1 participant