XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.ServerInteractive

[DLL] Server interaction extension, including user identity verification and querying in conjunction with AutoConfig

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension.NetCore.ServerInteractive

Address code review: improve error messages for better diagnostics

Agent-Logs-Url: https://github.com/XFEstudio/XFEExtension.NetCore.ServerInteractive/sessions/a1e53d1d-33f2-4970-bb42-5a5c1de44993 Co-authored-by: XFEstudio <132526994+XFEstudio@users.noreply.github.com>

6ebd617
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
提交于

代码差异

2 个文件 +2 -2
Modified XFEExtension.NetCore.ServerInteractive/Utilities/Requester/XFEClientRequester.cs +1 -1
@@ -76,7 +76,7 @@ public abstract class XFEClientRequester : IRequesterBase
76 76 var actualRoute = xFEService.RequestRouteMap.TryGetValue(serviceName, out var route) ? route : serviceName;
77 77 xFEService.Route = actualRoute;
78 78 if (!xFEService.RequestPoints.TryGetValue(serviceName, out var requestHandler))
79 throw new XFERequesterException($"未找到路由'{serviceName}'对应的[Request]方法");
79 throw new XFERequesterException($"未找到'{serviceName}'对应的请求处理方法([Request]标记的方法)");
80 80 var (response, code) = await InteractiveHelper.GetServerResponse(RequestAddress + $"/{actualRoute}", requestHandler(), _jsonSerializerOptions);
81 81 result.StatusCode = code;
82 82 if (code == HttpStatusCode.OK)
Modified XFEExtension.NetCore.ServerInteractive/Utilities/Requester/XFEClientRequesterBuilder.cs +1 -1
@@ -61,7 +61,7 @@ public abstract class XFEClientRequesterBuilder : XFEBuilderBase<XFEClientReques
61 61 .ToList();
62 62
63 63 if (routeKeys.Count == 0)
64 throw new InvalidOperationException($"类型 {typeof(T).Name} 的 RequestPoints/ResponsePoints 为空");
64 throw new InvalidOperationException($"类型 {typeof(T).Name} 的 RequestPoints/ResponsePoints/RequestRouteMap 为空,请确保已使用[Request]或[Response]标记方法");
65 65
66 66 // 为每个路径/名称注册服务工厂
67 67 foreach (var key in routeKeys)