exception documentation

class LoopError(SDKError): (source)

View In Hierarchy

Exception raised when a synchronous helper conflicts with an asyncio event loop.

A synchronous operation raises this error if its asyncio event loop is already running in the current thread. Channel.run_sync is one example of such an operation.

The exception subclasses SDKError so callers catching SDK-related errors will also catch this condition.

LoopError does not add any new behaviour beyond the base error; it serves only to provide a more specific error type for loop misuse.