From 1a6ae05c08c008c911d670e4a44aeae9bccffc7d Mon Sep 17 00:00:00 2001 From: ssgueye2 Date: Fri, 16 Jun 2023 13:26:05 +0200 Subject: [PATCH] Fix some warnings --- .../Services/AWS/AWSDeviceService.cs | 4 ++-- .../Services/AwsExternalDeviceService.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IoTHub.Portal.Infrastructure/Services/AWS/AWSDeviceService.cs b/src/IoTHub.Portal.Infrastructure/Services/AWS/AWSDeviceService.cs index e286eb63c..2b6562f39 100644 --- a/src/IoTHub.Portal.Infrastructure/Services/AWS/AWSDeviceService.cs +++ b/src/IoTHub.Portal.Infrastructure/Services/AWS/AWSDeviceService.cs @@ -121,7 +121,7 @@ public override async Task DeleteDevice(string deviceId) { foreach (var principal in principals.Principals) { - var detachPrincipal = await this.amazonIoTClient.DetachThingPrincipalAsync(new DetachThingPrincipalRequest + _ = await this.amazonIoTClient.DetachThingPrincipalAsync(new DetachThingPrincipalRequest { Principal = principal, ThingName = device.Name @@ -136,7 +136,7 @@ public override async Task DeleteDevice(string deviceId) try { //Delete the thing type after detaching the principal - var deleteResponse = await this.amazonIoTClient.DeleteThingAsync(this.mapper.Map(device)); + _ = await this.amazonIoTClient.DeleteThingAsync(this.mapper.Map(device)); } catch (AmazonIoTException e) { diff --git a/src/IoTHub.Portal.Infrastructure/Services/AwsExternalDeviceService.cs b/src/IoTHub.Portal.Infrastructure/Services/AwsExternalDeviceService.cs index 1425194a2..cb0949688 100644 --- a/src/IoTHub.Portal.Infrastructure/Services/AwsExternalDeviceService.cs +++ b/src/IoTHub.Portal.Infrastructure/Services/AwsExternalDeviceService.cs @@ -381,7 +381,7 @@ private async Task> Count() } catch (ResourceNotFoundException e) { - this.logger.LogInformation($"Cannot import device '{device.ThingName}' since it doesn't have related classic thing shadow"); + this.logger.LogInformation($"Cannot import device '{device.ThingName}' since it doesn't have related classic thing shadow", e); continue; } catch (AmazonIotDataException e)