json_py_err
No overview available.
def json_py_err(
exception: Exception
) - > str
Converts a Python exception into a JSON-formatted error response for API consistency.
Parameters
| Name | Type | Description |
|---|---|---|
| exception | Exception | The Python exception object to be serialized into the error response. |
Returns
| Type | Description |
|---|---|
str | A JSON string containing the error type and the exception message. |