mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-17 20:39:13 +00:00
fix(api-v3): log the traceback on the editor state-write failure
The 848 fix answers 500 when the session state cannot be written, and logged that at error level -- but without exc_info, so the traceback never reached the log. test_web_error_detail.py guards exactly this: a handler returning 5xx must write an error-level record *with* the traceback and return the sanitized detail, because checking that merely something was logged is too weak. Caught by Core unit tests on the previous commit, not locally: the guard parses every module under web_interface/blueprints/api_v3 as one source, so it only fires once the whole package is read together. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -872,7 +872,11 @@ def start_pixlet_editor():
|
||||
# The process is up but nothing records its PID: status and stop
|
||||
# would both report no session while the display stays down until
|
||||
# the timeout expires. Take the editor with us instead.
|
||||
logger.error('Started an editor session but could not record it: %s', err)
|
||||
# exc_info: this path answers 500, and the guard in
|
||||
# test_web_error_detail.py requires the traceback to reach the log
|
||||
# as well as the sanitized detail reaching the caller.
|
||||
logger.error('Started an editor session but could not record it: %s',
|
||||
err, exc_info=True)
|
||||
_terminate_editor_process(process.pid)
|
||||
return jsonify({'status': 'error',
|
||||
'message': 'Could not record the editor session; '
|
||||
|
||||
Reference in New Issue
Block a user