Skip to content

Commit fcb9e82

Browse files
committed
[APIM] Update policy example for APIM-SF integration
1 parent f4fa5e5 commit fcb9e82

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

articles/api-management/how-to-configure-service-fabric-backend.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ Add the [`set-backend-service`](api-management-transformation-policies.md#SetBac
112112

113113
1. On the **Design** tab, in the **Inbound processing** section, select the code editor (**</>**) icon.
114114
1. Position the cursor inside the **&lt;inbound&gt;** element
115-
1. Add the following policy statement. In `backend-id`, substitute the name of your Service Fabric backend.
115+
1. Add the `set-service-backend` policy statement.
116+
* In `backend-id`, substitute the name of your Service Fabric backend.
116117

117-
The `sf-resolve-condition` is a retry condition if the cluster partition isn't resolved. The number of retries was set when configuring the backend.
118+
* The `sf-resolve-condition` is a condition for re-resolving a service location and resending a request. The number of retries was set when configuring the backend. The following example handles cases where the Service Fabric cluster partition isn't resolved, or cluster nodes are removed or unavailable.
118119

119120
```xml
120-
<set-backend-service backend-id="mysfbackend" sf-resolve-condition="@(context.LastError?.Reason == "BackendConnectionFailure")" />
121+
<set-backend-service backend-id="mysfbackend" sf-resolve-condition="@((int)context.Response.StatusCode != 200 || context.LastError?.Reason == "BackendConnectionFailure" || context.LastError?.Reason == "Timeout")"/>
121122
```
122123
1. Select **Save**.
123124

0 commit comments

Comments
 (0)