         
         switch response {
         case let .failure(errorResponse):
-            operation.failure(errorResponse)
+            guard errorResponse.error != .attributeNotFound else {
+                return
+            }
+            throw Error.errorResponse(errorResponse)
         case let .success(response):
             // store PDU values
             for serviceData in response.attributeData {
-                
                 guard let littleEndianServiceUUID = BluetoothUUID(data: serviceData.value) else {
-                    operation.completion(.failure(Error.invalidResponse(response)))
-                    return
+                    throw Error.invalidResponse(response)
                 }
-                
                 let serviceUUID = BluetoothUUID(littleEndian: littleEndianServiceUUID)
                 let service = Service(
                     uuid: serviceUUID,

    /// - Parameter service: The service.
    /// - Parameter completion: The completion closure.
    public func discoverAllCharacteristics(of service: Service) async throws -> [Characteristic] {
        
        // The Attribute Protocol Read By Type Request shall be used with the Attribute Type
        // parameter set to the UUID for «Characteristic» The Starting Handle shall be set to 
        // starting handle of the specified service and the Ending Handle shall be set to the 
        // ending handle of the specified service.
        
        return try await discoverCharacteristics(service: service)
    }
    

    public func discoverPrimaryServices(
        by uuid: BluetoothUUID
    ) async throws -> [Service]{
        // The Attribute Protocol Find By Type Value Request shall be used with the Attribute Type
        // parameter set to the UUID for «Primary Service» and the Attribute Value set to the 16-bit
        // Bluetooth UUID or 128-bit UUID for the specific primary service. 
