Skip to content

Commit 2cef7bb

Browse files
committed
fix(server.py): improve error handling by chaining exceptions for better debugging context
chore(pyproject.toml): update linter configuration keys for consistency and clarity
1 parent 1679ac3 commit 2cef7bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mcp_shell_server/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def call_tool(name: str, arguments: Any) -> Sequence[TextContent]:
9696
except Exception as e:
9797
logger.error(traceback.format_exc())
9898
logger.error(f"Error during call_tool: {str(e)}")
99-
raise RuntimeError(f"Error executing command: {str(e)}")
99+
raise RuntimeError(f"Error executing command: {str(e)}") from e
100100

101101

102102
async def main() -> None:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ testpaths = "tests"
4141
asyncio_default_fixture_loop_scope = "function"
4242

4343
[tool.ruff]
44-
select = [
44+
lint.select = [
4545
"E", # pycodestyle errors
4646
"F", # pyflakes
4747
"W", # pycodestyle warnings
4848
"I", # isort
4949
"C", # flake8-comprehensions
5050
"B", # flake8-bugbear
5151
]
52-
ignore = [
52+
lint.ignore = [
5353
"E501", # line too long, handled by black
5454
"B008", # do not perform function calls in argument defaults
5555
"C901", # too complex

0 commit comments

Comments
 (0)