Skip to content

Commit

Permalink
Update dependency Bogus to v31 (#1276)
Browse files Browse the repository at this point in the history
* Update dependency Bogus to v31

* Code quality

Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
  • Loading branch information
3 people authored Sep 14, 2020
1 parent 1bd69e1 commit 7985993
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
15 changes: 6 additions & 9 deletions src/Promitor.Core.Scraping/Scraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,13 @@ private void HandleErrorResponseException(ErrorResponseException errorResponseEx
var definition = new { error = new { code = "", message = "" } };
var jsonError = JsonConvert.DeserializeAnonymousType(errorResponseException.Response.Content, definition);

if (jsonError.error != null)
if (!string.IsNullOrEmpty(jsonError.error.message))
{
if (!string.IsNullOrEmpty(jsonError.error.message))
{
reason = $"{jsonError.error.code}: {jsonError.error.message}";
}
else if (!string.IsNullOrEmpty(jsonError.error.code))
{
reason = $"{jsonError.error.code}";
}
reason = $"{jsonError.error.code}: {jsonError.error.message}";
}
else if (!string.IsNullOrEmpty(jsonError.error.code))
{
reason = $"{jsonError.error.code}";
}
}
catch (Exception)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Arcus.Observability.Telemetry.Core" Version="0.3.0" />
<PackageReference Include="Arcus.Testing.Logging" Version="0.1.0" />
<PackageReference Include="Bogus" Version="30.0.4" />
<PackageReference Include="Bogus" Version="31.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/Promitor.Tests.Unit/Promitor.Tests.Unit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.0.0" />
<PackageReference Include="Bogus" Version="30.0.4" />
<PackageReference Include="Bogus" Version="31.0.2" />
<PackageReference Include="Fastenshtein" Version="1.0.0.5" />
<PackageReference Include="JetBrains.DotMemoryUnit" Version="3.1.20200127.214830" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
Expand Down

0 comments on commit 7985993

Please sign in to comment.