Wrap backend failures in the public Switchyard backend error.
(error: BaseException)
| 455 | |
| 456 | |
| 457 | def _backend_error(error: BaseException) -> RuntimeError: |
| 458 | """Wrap backend failures in the public Switchyard backend error.""" |
| 459 | native = _load_native() |
| 460 | if isinstance(error, native.SwitchyardRuntimeError): |
| 461 | return error |
| 462 | return native.SwitchyardBackendError(str(error)) |
| 463 | |
| 464 | |
| 465 | class Switchyard: |
no test coverage detected