model/errors/telnyx_error_factory library
Factory methods for creating TelnyxError instances from the SDK error registry.
Usage:
final error = createTelnyxError(TelnyxErrorCodes.sdpCreateOfferFailed);
throw error;
Functions
-
classifyMediaErrorCode(
Object? error) → int -
Classifies
error— a PlatformException, string, or generic object — into the matching TelnyxErrorCodes media code. -
createTelnyxError(
int code, {String? message, bool? fatal, Object? originalError}) → TelnyxError -
Creates a TelnyxError from a registered error
code.