I've been looking for a way to not interrupt the user journey in a AAD B2C custom policy after receiving a HTTP 409 response from a REST API call which is invoked by a validation techcnical profile with ContinueOnError=true. I tried doing what is suggested here Error handling in Azure B2C Custom Policy REST Call (adding a dummy VTP which succeeds after the one that doesn't), but I keep getting a server error from AAD B2C and it doesn't seem like the second VTP get's called, despite ContinueOnError=true on the first one.
What I'm trying to achieve is: handle HTTP 409 responses from a REST API and customise the rest of the user journey on the basis of the error code received.
The way in which I'm trying to achieve it is: orchestration step x calls a technical profile which outputs a few claims that are obtained via a validation technical profile which calls a REST API. Orchestration step x+1 defines some custom behaviour on the basis of the error code received from the REST API. The API error response is formatted in the way in which it is expected by AAD B2C https://learn.microsoft.com/en-us/azure/active-directory-b2c/restful-technical-profile.
The only viable way I've found so far is to use an API proxy, which converts the HTTP 409 responses to HTTP 200. I would rather not do this if I can.
Any ideas would be appreciated.