Skip to content

Commit 8331132

Browse files
committed
sonar fixes
1 parent fa5f7c5 commit 8331132

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libraries/src/AWS.Lambda.Powertools.Metrics/Metrics.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,11 +596,11 @@ void IMetrics.AddDimensions(params (string key, string value)[] dimensions)
596596
foreach (var (key, value) in dimensions)
597597
{
598598
if (string.IsNullOrWhiteSpace(key))
599-
throw new ArgumentNullException(nameof(key),
599+
throw new ArgumentNullException(nameof(dimensions),
600600
"'AddDimensions' method requires valid dimension keys. 'Null' or empty values are not allowed.");
601601

602602
if (string.IsNullOrWhiteSpace(value))
603-
throw new ArgumentNullException(nameof(value),
603+
throw new ArgumentNullException(nameof(dimensions),
604604
"'AddDimensions' method requires valid dimension values. 'Null' or empty values are not allowed.");
605605
}
606606

libraries/src/AWS.Lambda.Powertools.Metrics/Model/MetricDirective.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ internal void AddDimension(DimensionSet dimension)
214214
// Check the actual dimension count inside the first dimension set
215215
if (firstDimensionSet.Dimensions.Count >= PowertoolsConfigurations.MaxDimensions)
216216
{
217-
throw new ArgumentOutOfRangeException(nameof(Dimensions),
217+
throw new ArgumentOutOfRangeException(nameof(dimension),
218218
$"Cannot add more than {PowertoolsConfigurations.MaxDimensions} dimensions at the same time.");
219219
}
220220

0 commit comments

Comments
 (0)