Version 1.5: Groups
This commit is contained in:
@@ -274,6 +274,7 @@ final class MAWebSocketClient {
|
||||
// Check for error
|
||||
if let errorCode = response.errorCode {
|
||||
let errorMsg = response.details ?? "Error code: \(errorCode)"
|
||||
logger.error("Server error \(errorCode) for message \(messageId): \(errorMsg)")
|
||||
continuation.resume(throwing: ClientError.serverError(errorMsg))
|
||||
} else {
|
||||
continuation.resume(returning: response)
|
||||
@@ -363,7 +364,7 @@ final class MAWebSocketClient {
|
||||
throw ClientError.decodingError(NSError(domain: "Encoding", code: -1))
|
||||
}
|
||||
|
||||
logger.debug("Sending command: \(command) (ID: \(messageId))")
|
||||
logger.debug("Sending command: \(command) (ID: \(messageId)) payload: \(json)")
|
||||
|
||||
// Send message and wait for response
|
||||
return try await withCheckedThrowingContinuation { continuation in
|
||||
|
||||
Reference in New Issue
Block a user