Skip to content

Commit

Permalink
Merge pull request #27 from chgl/only-update-if-response-is-set
Browse files Browse the repository at this point in the history
fix: only update resource count if response is set
  • Loading branch information
chgl authored Feb 28, 2021
2 parents 6ba2bc1 + 706434d commit 2218252
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/FhirServerExporter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ private async Task UpdateResourceCountAsync(string resourceType)
resourceType,
total);

ResourceCount.WithLabels(resourceType).Set(total ?? 0);
if (total.HasValue)
{
ResourceCount.WithLabels(resourceType).Set(total.Value);
}
}
catch (Exception exc)
{
Expand Down

0 comments on commit 2218252

Please sign in to comment.