Rename catch-all outcome
This commit is contained in:
parent
c5f35c81fc
commit
ba02b80fb0
|
|
@ -20,7 +20,7 @@ export class FlowHttpRequestPortProvider implements PortProvider {
|
|||
|
||||
const statusCodesJson = (expectedStatusCodes.expression as JsonExpression).value;
|
||||
const statusCodes = JSON.parse(statusCodesJson) as Array<string>;
|
||||
const catchAllPort = {name: 'Catch all', displayName: 'Catch all', mode: PortMode.Port};
|
||||
const catchAllPort = {name: 'Unmatched status code', displayName: 'Unmatched status code', mode: PortMode.Port};
|
||||
const outcomes = [...statusCodes.map(x => ({name: x.toString(), displayName: x.toString(), mode: PortMode.Port})), catchAllPort];
|
||||
|
||||
return outcomes;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class FlowSendHttpRequest : SendHttpRequestBase
|
|||
var expectedStatusCodes = ExpectedStatusCodes.TryGet(context) ?? new List<int>(0);
|
||||
var statusCode = (int)response.StatusCode;
|
||||
var hasMatchingStatusCode = expectedStatusCodes.Contains(statusCode);
|
||||
var outcome = hasMatchingStatusCode ? statusCode.ToString() : "Catch all";
|
||||
var outcome = hasMatchingStatusCode ? statusCode.ToString() : "Unmatched status code";
|
||||
|
||||
await context.CompleteActivityWithOutcomesAsync(outcome);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue