diff --git a/Sources/SwiftOBD2/Communication/bleManager.swift b/Sources/SwiftOBD2/Communication/bleManager.swift index f7718db..a10882c 100644 --- a/Sources/SwiftOBD2/Communication/bleManager.swift +++ b/Sources/SwiftOBD2/Communication/bleManager.swift @@ -299,7 +299,12 @@ class BLEManager: NSObject, CommProtocol { if let response = response { continuation.resume(returning: response) } else if let error = error { - continuation.resume(throwing: error) + if let bleError = error as? BLEManagerError { + // Handle the BLEManagerError cases + continuation.resume(returning: [bleError.description]) + } else { + continuation.resume(throwing: error) + } } self.sendMessageCompletion = nil }