diff --git a/Bootstrap.Admin/Controllers/Api/GiteeController.cs b/Bootstrap.Admin/Controllers/Api/GiteeController.cs index 56b4854e..c8f471a5 100644 --- a/Bootstrap.Admin/Controllers/Api/GiteeController.cs +++ b/Bootstrap.Admin/Controllers/Api/GiteeController.cs @@ -90,7 +90,7 @@ namespace Bootstrap.Admin.Controllers.Api { var client = httpClientFactory.CreateClient(); var content = await GetJsonAsync(() => client.GetAsJsonAsync($"https://ci.appveyor.com/api/projects/{userName}/{projName}/branch/{branchName}")); - return new JsonResult(new { schemaVersion = 1, label, message = content.Build.Version, color }); + return new JsonResult(new { schemaVersion = 1, label, message = content == null ? "unknown" : content.Build.Version, color }); } private async static Task GetJsonAsync(Func> callback)