|
|
@@ -611,13 +611,23 @@ namespace molilian.core
|
|
|
var response = client.Request(url);
|
|
|
|
|
|
var body = response.Body();
|
|
|
- var root = body.Convert2JsonElement();
|
|
|
+ JsonElement root = default;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ root = body.Convert2JsonElement();
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ _ = new LoggerLibrary("error", "SaveReportOverview").Info(url, body).SaveAsync();
|
|
|
+
|
|
|
+ throw new Exception("SaveReportOverview body不是 json格式");
|
|
|
+ }
|
|
|
|
|
|
int resultCode = root.Read<int>("resultCode", 0);
|
|
|
bool success = root.Read("success", false);
|
|
|
if (!success)
|
|
|
{
|
|
|
- _ = new LoggerLibrary("report", "error")
|
|
|
+ _ = new LoggerLibrary("error", "SaveReportOverview")
|
|
|
.Info(url, body)
|
|
|
.SaveAsync();
|
|
|
|