feat: 健康检查增加数据库驱动未引用时解决办法

This commit is contained in:
Argo Zhang 2020-02-25 18:38:37 +08:00
parent 181fd03e17
commit bc1b9b0ffe
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 2 additions and 0 deletions

View File

@ -102,6 +102,8 @@ namespace Bootstrap.Admin.HealthChecks
{
data.Add("Exception", error.Message);
if (error.Message.Contains("Could not load", StringComparison.OrdinalIgnoreCase)) data.Add("解决办法", "Nuget 引用相对应 dll");
// UNDONE: Json 序列化循环引用导致异常 NET 5.0 修复此问题
// 目前使用 new Exception() 临时解决
return Task.FromResult(HealthCheckResult.Unhealthy("Error", new Exception(error.Message), data));