Skip to content

Commit

Permalink
Fix pedantic IndexOf behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-peterson committed Aug 21, 2023
1 parent b31cf7c commit 3d75010
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Spiffy.Monitoring.Aws/AwsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void Handle(string message)
// An exception of type HttpErrorResponseException was handled in ErrorHandler...
// UnsupportedLanguagePairException making request TranslateTextRequest...
// An exception of type TimeoutException was handled in ErrorHandler...
if (message.IndexOf("exception", 100, StringComparison.OrdinalIgnoreCase) != -1)
if (message.IndexOf("exception", Math.Min(100, message.Length), StringComparison.OrdinalIgnoreCase) != -1)
{
context.SetToError();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Spiffy.Monitoring.Aws/Spiffy.Monitoring.Aws.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<RootNamespace>Spiffy.Monitoring.Aws</RootNamespace>
</PropertyGroup>

Expand Down

0 comments on commit 3d75010

Please sign in to comment.