From 8f3951199fcdd0806912e2a953d80db9466518a8 Mon Sep 17 00:00:00 2001 From: Jesper Johansson <21033162+jesperjohansson@users.noreply.github.com> Date: Mon, 30 Jan 2023 11:55:07 +0100 Subject: [PATCH] fix(iOS): Throw specific error messages (#171) --- ios/TcpSockets.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/TcpSockets.m b/ios/TcpSockets.m index 23c961f..3a9783a 100644 --- a/ios/TcpSockets.m +++ b/ios/TcpSockets.m @@ -283,7 +283,7 @@ - (void)onClose:(NSNumber *)clientID withError:(NSError *)err { } - (void)onError:(TcpSocketClient *)client withError:(NSError *)err { - NSString *msg = err.localizedFailureReason ?: err.localizedDescription; + NSString *msg = err.localizedDescription ?: err.localizedFailureReason; [self sendEventWithName:@"error" body:@{@"id" : client.id, @"error" : msg}]; }