The exception a Python secret manager raised anywhere in the chain, so a route surfaces it unchanged instead of wrapping it.
(
py: Python<'_>,
error: &(dyn std::error::Error + 'static),
)
| 87 | /// The exception a Python secret manager raised anywhere in the chain, so a route surfaces it |
| 88 | /// unchanged instead of wrapping it. |
| 89 | pub(crate) fn python_error( |
| 90 | py: Python<'_>, |
| 91 | error: &(dyn std::error::Error + 'static), |
| 92 | ) -> Option<PyErr> { |
| 93 | litellm_error::find::<PythonSecretError>(error) |
| 94 | .map(|error| PyErr::from_value(error.0.clone_ref(py).into_bound(py).into_any())) |
| 95 | } |
no test coverage detected