diff --git a/src/Serval.Translation/Services/GrpcServiceHealthCheck.cs b/src/Serval.Translation/Services/GrpcServiceHealthCheck.cs index 6cdb7cb9..c56d5e00 100644 --- a/src/Serval.Translation/Services/GrpcServiceHealthCheck.cs +++ b/src/Serval.Translation/Services/GrpcServiceHealthCheck.cs @@ -33,7 +33,9 @@ public async Task 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;