File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
src/WebJobs.Script.Grpc/Channel Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 7
7
- Patch Durable Functions Extension version check (https://github.com/Azure/azure-functions-host/pull/9331 )
8
8
- Update Java Worker Version to [ 2.12.0] ( https://github.com/Azure/azure-functions-java-worker/releases/tag/2.12.0 )
9
9
- Remove feature flag for http proxying (https://github.com/Azure/azure-functions-host/pull/9341 )
10
+ - Add error handling for http proxying failure scenarios (https://github.com/Azure/azure-functions-host/pull/9342 )
Original file line number Diff line number Diff line change @@ -963,24 +963,23 @@ internal async Task InvokeResponse(InvocationResponse invokeResponse)
963
963
{
964
964
if ( invokeResponse . Result . IsInvocationSuccess ( context . ResultSource , capabilityEnabled ) )
965
965
{
966
- if ( IsHttpProxyingWorker )
966
+ _metricsLogger . LogEvent ( string . Format ( MetricEventNames . WorkerInvokeSucceeded , Id ) ) ;
967
+
968
+ try
967
969
{
968
- if ( context . Properties . TryGetValue ( ScriptConstants . HttpProxyTask , out Task < ForwarderError > httpProxyTask ) )
970
+ if ( IsHttpProxyingWorker )
969
971
{
970
- ForwarderError httpProxyTaskResult = await httpProxyTask ;
971
-
972
- if ( httpProxyTaskResult is not ForwarderError . None )
972
+ if ( context . Properties . TryGetValue ( ScriptConstants . HttpProxyTask , out Task < ForwarderError > httpProxyTask ) )
973
973
{
974
- // TODO: Understand scenarios where function invocation succeeds but there is an error proxying
975
- // need to investigate different ForwarderErrors and consider how they will be relayed through other services and to users
974
+ ForwarderError httpProxyTaskResult = await httpProxyTask ;
975
+
976
+ if ( httpProxyTaskResult is not ForwarderError . None )
977
+ {
978
+ throw new InvalidOperationException ( $ "Failed to proxy request with ForwarderError: { httpProxyTaskResult } ") ;
979
+ }
976
980
}
977
981
}
978
- }
979
-
980
- _metricsLogger . LogEvent ( string . Format ( MetricEventNames . WorkerInvokeSucceeded , Id ) ) ;
981
982
982
- try
983
- {
984
983
StringBuilder logBuilder = new StringBuilder ( ) ;
985
984
bool usedSharedMemory = false ;
986
985
You can’t perform that action at this time.
0 commit comments