TelnyxSocketError
This class is used to represent an error received from the Telnyx Socket. It contains anerrorCode
which is an integer representing the error code and an errorMessage which is a string representing
the error message.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check out our upcoming events and meetups! View events →
TelnyxSocketError reference for the Flutter Voice SDK. Represents an error received over the Telnyx WebSocket — codes, messages, and recovery patterns.
errorCode
which is an integer representing the error code and an errorMessage which is a string representing
the error message.
class TelnyxSocketError {
int errorCode = 0;
String errorMessage = '';
TelnyxSocketError({required this.errorCode, required this.errorMessage});
TelnyxSocketError.fromJson(Map<String, dynamic> json) {
errorCode = json['code'] ?? 0;
errorMessage = json['message'] ?? '';
}
}
class TelnyxErrorConstants {
static const tokenError = 'Token registration error';
static const tokenErrorCode = -32000;
static const credentialError = 'Credential registration error';
static const credentialErrorCode = -32001;
static const gatewayTimeoutError = 'Gateway registration timeout';
static const gatewayTimeoutErrorCode = -32003;
static const gatewayFailedError = 'Gateway registration failed';
static const gatewayFailedErrorCode = -32004;
static const callNotFound = 'Call not found';
}
Was this page helpful?