MechanicalMCPError#

exception ansys.mechanical.mcp.errors.MechanicalMCPError(message: str, *, details: dict[str, Any] | None = None)#

Bases: Exception

Base error carrying a stable machine-readable error code.

Overview#

to_dict

Return a JSON-serializable error payload.

Import detail#

from ansys.mechanical.mcp.errors import MechanicalMCPError

Attribute detail#

MechanicalMCPError.error_code = 'internal_error'#
MechanicalMCPError.message#
MechanicalMCPError.details#

Method detail#

MechanicalMCPError.to_dict() dict[str, Any]#

Return a JSON-serializable error payload.