Skip to content

Commit

Permalink
Clear traceback from server error when in prod mode (not debug)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen committed Feb 16, 2024
1 parent eceb7e2 commit 30c6ca2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mesop/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def render_loop(
)

def yield_errors(error: pb.ServerError) -> Generator[str, None, None]:
if not runtime().debug_mode:
error.ClearField("traceback")
ui_response = pb.UiResponse(error=error)

yield serialize(ui_response)
Expand Down

0 comments on commit 30c6ca2

Please sign in to comment.