Skip to content

Commit

Permalink
#285 - fix it (#291)
Browse files Browse the repository at this point in the history
* #285 - fix it

* better syntax from review.
  • Loading branch information
johnml1135 authored Jan 31, 2024
1 parent 4c45abf commit bf93667
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Serval.Translation/Services/GrpcServiceHealthCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public async Task<HealthCheckResult> CheckHealthAsync(
new(
status: (HealthStatus)healthCheckResponse.Status,
description: context.Registration.Name,
exception: healthCheckResponse.Error is null ? null : new Exception(healthCheckResponse.Error),
exception: string.IsNullOrEmpty(healthCheckResponse.Error)
? null
: new Exception(healthCheckResponse.Error),
data: healthCheckResponse.Data.ToDictionary(kvp => kvp.Key, kvp => (object)kvp.Value)
);
return healthCheckResult;
Expand Down

0 comments on commit bf93667

Please sign in to comment.