mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
use logger.exeception
This commit is contained in:
parent
a2f710fa9d
commit
4262468b44
1 changed files with 3 additions and 6 deletions
|
|
@ -502,9 +502,8 @@ async def run(
|
|||
process = subprocess.run(cmd, check=True, env=env)
|
||||
sys.exit(process.returncode)
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error(
|
||||
logger.exception(
|
||||
f"Failed to run: {e}",
|
||||
exc_info=True,
|
||||
extra={
|
||||
"server_spec": server_spec,
|
||||
"error": str(e),
|
||||
|
|
@ -527,9 +526,8 @@ async def run(
|
|||
skip_source=skip_source,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
logger.exception(
|
||||
f"Failed to run: {e}",
|
||||
exc_info=True,
|
||||
extra={
|
||||
"server_spec": server_spec,
|
||||
"error": str(e),
|
||||
|
|
@ -768,13 +766,12 @@ async def inspect(
|
|||
console.print(formatted_json.decode("utf-8"))
|
||||
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
logger.exception(
|
||||
f"Failed to inspect server: {e}",
|
||||
extra={
|
||||
"server_spec": server_spec,
|
||||
"error": str(e),
|
||||
},
|
||||
exc_info=True,
|
||||
)
|
||||
console.print(f"[bold red]✗[/bold red] Failed to inspect server: {e}")
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue