Skip to content

fix: tighten server manager exception handling#871

Open
realfishsam wants to merge 6 commits into
mainfrom
fix/issue-813-821-server-manager
Open

fix: tighten server manager exception handling#871
realfishsam wants to merge 6 commits into
mainfrom
fix/issue-813-821-server-manager

Conversation

@realfishsam
Copy link
Copy Markdown
Contributor

Summary\n- Replace bare / overly broad exception handlers in the Python server manager with narrower, expected failure modes.\n- Preserve the existing behavior of treating unreadable lockfiles and transient process errors as non-fatal, while avoiding silent masking of programming errors.\n\n## Tests\n- python3 -m compileall sdks/python/pmxt\n\nFixes #813\nFixes #814\nFixes #815\nFixes #816\nFixes #817\nFixes #818\nFixes #819\nFixes #820\nFixes #821

Fix bare and overly broad exception handlers in the Python sidecar manager.

Fixes #813
Fixes #814
Fixes #815
Fixes #816
Fixes #817
Fixes #818
Fixes #819
Fixes #820
Fixes #821
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Jun 5, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
PMXT 🟢 Ready View Preview Jun 5, 2026, 2:23 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

if expected_base != server_base:
return True
except Exception:
except (OSError, json.JSONDecodeError, AttributeError, KeyError, TypeError, ValueError):
if result.stdout.strip():
time.sleep(0.5)
except Exception:
except (OSError, subprocess.TimeoutExpired, ValueError):
os.kill(pid, signal.SIGTERM)
time.sleep(0.5)
except Exception:
except (OSError, subprocess.TimeoutExpired):
os.kill(pid, signal.SIGKILL)
time.sleep(0.2)
except Exception:
except OSError:
try:
self.lock_path.unlink()
except:
except OSError:
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