Skip to content

fix: raise HTTPException instead of returning it in history proxy#146

Draft
hussein-awala wants to merge 1 commit intomainfrom
fix/raise-http-exception
Draft

fix: raise HTTPException instead of returning it in history proxy#146
hussein-awala wants to merge 1 commit intomainfrom
fix/raise-http-exception

Conversation

@hussein-awala
Copy link
Owner

Summary

  • spark_history_reverse_proxy was returning HTTPException instead of raising it
  • This caused FastAPI to serialize the exception as a regular JSON dict with a 200 status code instead of the intended 412

Test plan

  • Verify accessing /webserver/ui-history/ without SPARK_ON_K8S_API_SPARK_HISTORY_HOST set returns a 412 status code

🤖 Generated with Claude Code

Returning an HTTPException serializes it as a dict with a 200 status
code. FastAPI requires HTTPException to be raised to properly return
the intended error status code (412).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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