Skip to content

Commit 1fce5e8

Browse files
Copilotjack-arturo
andauthored
fix: include stop reason in error message when app stop fails
Agent-Logs-Url: https://github.com/verygoodplugins/streamdeck-mcp/sessions/bf3b8260-ea35-455c-99cf-579444999ff4 Co-authored-by: jack-arturo <13076544+jack-arturo@users.noreply.github.com>
1 parent 3bbc9e8 commit 1fce5e8

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

profile_manager.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,14 @@ def write_page(
461461
"to apply the changes."
462462
)
463463
app_stop_report = stop_stream_deck_app()
464-
if not app_stop_report.get("stopped", False) or is_stream_deck_app_running():
464+
stop_failed = not app_stop_report.get("stopped", False)
465+
still_running = is_stream_deck_app_running()
466+
if stop_failed or still_running:
467+
reason = app_stop_report.get("reason", "")
468+
detail = f" Reason: {reason}." if reason else ""
465469
raise StreamDeckAppRunningError(
466-
"The Elgato Stream Deck app could not be stopped. Aborting page "
467-
"write because the running app may overwrite these edits on quit."
470+
f"The Elgato Stream Deck app could not be stopped.{detail} Aborting "
471+
"page write because the running app may overwrite these edits on quit."
468472
)
469473

470474
profile_dir, profile_manifest = self._resolve_profile(

0 commit comments

Comments
 (0)