Skip to content

Commit

Permalink
Merge pull request #113 from team-telnyx/IS/Enhancement/ErrorTypes
Browse files Browse the repository at this point in the history
Is/enhancement/error types
  • Loading branch information
isaacakakpo1 authored Nov 30, 2023
2 parents 3e4394a + 0932992 commit 408aa28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TelnyxRTC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |spec|

spec.name = "TelnyxRTC"
spec.version = "0.1.15"
spec.version = "0.1.17"
spec.summary = "Enable Telnyx real-time communication services on iOS."
spec.description = "The Telnyx iOS WebRTC Client SDK provides all the functionality you need to start making voice calls from an iPhone."
spec.homepage = "https://github.com/team-telnyx/telnyx-webrtc-ios"
Expand Down
6 changes: 3 additions & 3 deletions TelnyxRTC/Telnyx/Models/TxError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public enum TxError : Error {
/// Socket is not connected. Check that you have an active connection.
case socketNotConnected
/// Socket connection was cancelled.
case socketCancelled
case socketCancelled(nativeError:Error)
}

/// The underlying reason of client setup configuration errors
Expand Down Expand Up @@ -131,8 +131,8 @@ extension TxError.SocketFailureReason: LocalizedError {
switch self {
case .socketNotConnected:
return "Socket connection cancelled."
case .socketCancelled:
return "Socket is not connected, check that you have called .connect() first."
case let .socketCancelled(nativeError):
return "Socket is connection is cancelled, try calling .connect again \(nativeError.localizedDescription)"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions TelnyxRTC/Telnyx/TxClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ extension TxClient : SocketDelegate {

func onSocketError(error: Error) {
Logger.log.i(message: "TxClient:: SocketDelegate onSocketError()")
let scoketError = TxError.socketConnectionFailed(reason: .socketCancelled(nativeError: error))
self.delegate?.onClientError(error: error)
if let txConfig = self.txConfig {
if(txConfig.reconnectClient){
Expand Down

0 comments on commit 408aa28

Please sign in to comment.