TelnyxError class
Structured error class matching JS SDK's TelnyxError.
Implements Exception so it can be thrown and caught in Dart.
- Implemented types
Constructors
-
TelnyxError({required int code, required String name, required String message, required String description, required List<
String> causes, required List<String> solutions, Object? originalError, required bool fatal, String? callId, String? sessionId, String? timestamp, Map<String, dynamic> ? context}) - Creates a structured Telnyx error.
Properties
- callId → String?
-
The call ID this error is associated with.
final
-
causes
→ List<
String> -
Possible root causes.
final
- code → int
-
Numeric error code (e.g. 40001).
final
-
context
→ Map<
String, dynamic> ? -
Optional context map with extra details.
final
- description → String
-
Full explanation of the error — what happened and why.
final
- fatal → bool
-
truewhen the situation is terminal — operation/call/session is dead and the client should stop.falsewhen the SDK is handling recovery or the failure is benign enough to ignore.final - hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
Short human-readable message suitable for UI alerts.
final
- name → String
-
Machine-readable error name in UPPER_SNAKE_CASE.
final
- originalError → Object?
-
The original error that triggered this, if any.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId → String?
-
The session ID this error is associated with.
final
-
solutions
→ List<
String> -
Suggested remediation steps.
final
- timestamp → String?
-
ISO-8601 timestamp when the error was emitted.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes this error to a JSON-encodable map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited