From 2beda8821e23b59f0915734c2f115d3960560db0 Mon Sep 17 00:00:00 2001 From: Roman Bulanenko Date: Wed, 27 Aug 2025 19:35:37 +0200 Subject: [PATCH 1/2] Do not incldue the connector response in the message --- .../Execution/HttpFunctionInvoker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs b/src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs index 5e3f93277a..97940a8ff0 100644 --- a/src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs +++ b/src/libraries/Microsoft.PowerFx.Connectors/Execution/HttpFunctionInvoker.cs @@ -440,7 +440,7 @@ public async Task DecodeResponseAsync(HttpResponseMessage response if (throwOnError) { - throw new HttpRequestException($"Http Status Error {statusCode}{reasonPhrase}: {text}"); + throw new HttpRequestException($"Http Status Error {statusCode}{reasonPhrase}"); } return FormulaValue.NewError( @@ -448,7 +448,7 @@ public async Task DecodeResponseAsync(HttpResponseMessage response { Kind = ErrorKind.Network, Severity = ErrorSeverity.Critical, - Message = $"The server returned an HTTP error with code {statusCode}{reasonPhrase}. Response: {text}" + Message = $"The server returned an HTTP error with code {statusCode}{reasonPhrase}." }, _function.ReturnType); } From 998f3f2b32a807e1afb0b7ea46196a631d042e91 Mon Sep 17 00:00:00 2001 From: Roman Bulanenko Date: Wed, 27 Aug 2025 19:41:59 +0200 Subject: [PATCH 2/2] use warning instead of error --- src/libraries/Microsoft.PowerFx.Connectors/ConnectorFunction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/Microsoft.PowerFx.Connectors/ConnectorFunction.cs b/src/libraries/Microsoft.PowerFx.Connectors/ConnectorFunction.cs index c627c15310..c0b10f588a 100644 --- a/src/libraries/Microsoft.PowerFx.Connectors/ConnectorFunction.cs +++ b/src/libraries/Microsoft.PowerFx.Connectors/ConnectorFunction.cs @@ -845,7 +845,7 @@ private async Task PostProcessResultAsync(FormulaValue result, Bas if (result is ErrorValue ev && (er = ev.Errors.FirstOrDefault(e => e.Kind == ErrorKind.Network)) != null) { - runtimeContext.ExecutionLogger?.LogError($"{this.LogFunction(nameof(PostProcessResultAsync))}, ErrorValue is returned with {er.Message}"); + runtimeContext.ExecutionLogger?.LogWarning($"{this.LogFunction(nameof(PostProcessResultAsync))}, ErrorValue is returned with {er.Message}"); result = FormulaValue.NewError(new ExpressionError() { Kind = er.Kind, Severity = er.Severity, Message = $"{DPath.Root.Append(new DName(Namespace)).ToDottedSyntax()}.{Name} failed: {er.Message}" }, ev.Type); }